mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Adds "self" to restored methods even if not in __doc__; closes PY-38.
Sorry, no meaningful test yet %)
This commit is contained in:
@@ -419,6 +419,12 @@ class ModuleRedeclarator(object):
|
||||
spec = reqargs + [n + v for (n, v) in zip(optargs, optargvals)]
|
||||
else:
|
||||
funcdoc = None
|
||||
# here we could have an empty spec because the doc comment states so
|
||||
if p_class and not spec:
|
||||
spec.append("self")
|
||||
if sig_note:
|
||||
sig_note += "; "
|
||||
sig_note += "added 'self'"
|
||||
self.out("def " + p_name + "(" + ", ".join(spec) + "): # " + sig_note, indent);
|
||||
self.outDocstring(funcdoc, indent+1)
|
||||
self.out("pass", indent+1);
|
||||
|
||||
Reference in New Issue
Block a user