Commit c7ba2b61 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 b8c5ceb0
......@@ -369,14 +369,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