Permalink
Browse files

cleanup inheritance line in auto-config files

rather than explicitly excluding particular base classes,
exclude any base classes that have no config traits to inherit.
  • Loading branch information...
1 parent 8f563c9 commit 7a02b908c32b7e3e5997f8cdcc0ca484c33667d5 @minrk committed Sep 15, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 IPython/config/configurable.py
@@ -207,8 +207,9 @@ def c(s):
for parent in cls.mro():
# only include parents that are not base classes
# and are not the class itself
- if issubclass(parent, Configurable) and \
- not parent in (Configurable, SingletonConfigurable, cls):
+ # and have some configurable traits to inherit
+ if parent is not cls and issubclass(parent, Configurable) and \
+ parent.class_traits(config=True):
parents.append(parent)
if parents:

0 comments on commit 7a02b90

Please sign in to comment.