From 5bd9bf0c8f0c3d298a8a171cc621149c32b9291c Mon Sep 17 00:00:00 2001
From: Christoph Groth <christoph.groth@cea.fr>
Date: Wed, 28 Aug 2013 12:55:51 +0200
Subject: [PATCH] remove self from autogenerated docs of bound methods

---
 doc/source/conf.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/doc/source/conf.py b/doc/source/conf.py
index 68af5afe..eb006cfb 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -233,5 +233,12 @@ class BoundMethodDocumenter(autodoc.FunctionDocumenter):
                 not issubclass(member.im_class, type) and
                 member.im_class is not types.ClassType)
 
+    def format_args(self):
+        args = super(BoundMethodDocumenter, self).format_args()
+        left, sep, right = args.partition('self, ')
+        if left.endswith('('):
+            args = left + right
+        return args
+
 def setup(app):
     app.add_autodocumenter(BoundMethodDocumenter)
-- 
GitLab