Commit a5a19a44 authored by Jérome Perrin's avatar Jérome Perrin

pylint: generate stubs for more methods

__getitem__ was missing causing unsubscriptable-object on BTrees
parent f09fa5d6
...@@ -379,14 +379,14 @@ def build_stub(parent, identifier_re=r'^[A-Za-z_]\w*$'): ...@@ -379,14 +379,14 @@ def build_stub(parent, identifier_re=r'^[A-Za-z_]\w*$'):
constants = {} constants = {}
methods = {} methods = {}
for name in dir(parent): for name in dir(parent):
if name.startswith("__"): if name in dir(object):
continue continue
# Check if this is a valid name in python # Check if this is a valid name in python
if not re.match(identifier_re, name): if not re.match(identifier_re, name):
continue continue
try: try:
obj = getattr(parent, name) obj = getattr(parent, name)
except: except AttributeError:
continue continue
if inspect.isclass(obj): if inspect.isclass(obj):
classes[name] = obj classes[name] = obj
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment