eric6/Debugger/VariablesViewer.py

branch
Variables Viewer
changeset 6994
681ed8916e69
parent 6993
d375f251496a
child 7012
cc3f83d1a605
diff -r d375f251496a -r 681ed8916e69 eric6/Debugger/VariablesViewer.py
--- a/eric6/Debugger/VariablesViewer.py	Fri May 03 22:55:23 2019 +0200
+++ b/eric6/Debugger/VariablesViewer.py	Fri May 03 22:56:07 2019 +0200
@@ -50,10 +50,16 @@
     
     noOfItemsStr = QCoreApplication.translate("VariablesViewer", "{0} items")
     
-    arrayTypes = {'list', 'tuple', 'dict', 'set', 'frozenset',
-                  'numpy.ndarray', 'django.MultiValueDict', 'array.array',
-                  'collections.defaultdict', "class 'dict_items'",
-                  "class 'dict_keys'", "class 'dict_values'"}
+    arrayTypes = {
+        'list', 'tuple', 'dict', 'set', 'frozenset', 'numpy.ndarray',
+        'django.MultiValueDict', 'array.array', 'collections.defaultdict',
+        "class 'dict_items'", "class 'dict_keys'", "class 'dict_values'",
+    }
+    
+    nonExpandableTypes = (
+        'method_descriptor', 'wrapper_descriptor', '', 'getset_descriptor',
+        'method-wrapper', 'member_descriptor',
+    )
     
     def __init__(self, parent, dvar, dtype, dvalue):
         """
@@ -135,8 +141,6 @@
         # Python class?
         if dtype.startswith('class '):
             dtype = dtype[7:-1]
-            if dtype not in ('method_descriptor', 'wrapper_descriptor'):
-                self.hasChilds = True
         # Qt related stuff?
         elif (dtype.startswith(ConfigQtNames) and
                 dtype.endswith(ConfigKnownQtTypes)):
@@ -147,8 +151,7 @@
         
         vtype = ConfigVarTypeDispStrings.get(dtype, dtype)
         # Unkown types should be expandable by default
-        if (vtype is dtype and
-                dtype not in ('method_descriptor', 'wrapper_descriptor')):
+        if vtype is dtype and dtype not in self.nonExpandableTypes:
             self.hasChilds = True
         self.type = QCoreApplication.translate("VariablesViewer", vtype)
     

eric ide

mercurial