We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11ea470 commit aa0d38bCopy full SHA for aa0d38b
traitlets/traitlets.py
@@ -1006,7 +1006,13 @@ def setup_class(cls, classdict): # noqa
1006
mro = cls.mro()
1007
1008
for name in dir(cls):
1009
- value = getattr(cls, name)
+ # Some descriptors raise AttributeError like zope.interface's
1010
+ # __provides__ attributes even though they exist. This causes
1011
+ # AttributeErrors even though they are listed in dir(cls).
1012
+ try:
1013
+ value = getattr(cls, name)
1014
+ except AttributeError:
1015
+ continue
1016
if isinstance(value, TraitType):
1017
cls._traits[name] = value
1018
trait = value
0 commit comments