From e1ced0b331f898664b33180b6a334869f8c87f37 2015-04-21 20:49:00 From: Thomas Kluyver Date: 2015-04-21 20:49:00 Subject: [PATCH] Don't handle traits specially in dir2 I have checked with traitlets, completions still work OK --- diff --git a/IPython/utils/dir2.py b/IPython/utils/dir2.py index 659f71d..5fb9fd1 100644 --- a/IPython/utils/dir2.py +++ b/IPython/utils/dir2.py @@ -51,15 +51,6 @@ def dir2(obj): # TypeError: dir(obj) does not return a list words = set() - # for objects with Enthought's traits, add trait_names() list - try: - func = getattr(obj, 'trait_names') - if callable(func): - words |= set(func()) - except: - # TypeError: obj is class not instance - pass - # filter out non-string attributes which may be stuffed by dir() calls # and poor coding in third-party modules