Commit 5ca2a249 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 42870f31
......@@ -379,14 +379,14 @@ def build_stub(parent, identifier_re=r'^[A-Za-z_]\w*$'):
constants = {}
methods = {}
for name in dir(parent):
if name.startswith("__"):
if name in dir(object):
continue
# Check if this is a valid name in python
if not re.match(identifier_re, name):
continue
try:
obj = getattr(parent, name)
except:
except AttributeError:
continue
if inspect.isclass(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