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*$'): ...@@ -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