From 17e1ee791b35b0262a00a163000fbf7f26cf98d6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 27 Aug 2019 21:13:21 +0200 Subject: [PATCH] documentation/python: special handling for self only if it's first. I doubt anyone sane will name any other function parameters like that, but let's be sure. --- documentation/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/python.py b/documentation/python.py index bf38994f..7ddaec8e 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -1095,7 +1095,7 @@ def extract_function_doc(state: State, parent, entry: Empty) -> List[Any]: param = Empty() param.name = name # Don't include redundant type for the self argument - if name == 'self': + if i == 0 and name == 'self': param.type = None arg_types += [None] else: -- 2.30.2