eric6/Debugger/VariablesViewer.py

branch
Variables Viewer
changeset 6978
720247f98e1f
parent 6969
fd7af2312383
child 6979
c272ec33ea11
--- a/eric6/Debugger/VariablesViewer.py	Mon Apr 22 10:38:32 2019 +0200
+++ b/eric6/Debugger/VariablesViewer.py	Sat Apr 27 22:06:38 2019 +0200
@@ -131,15 +131,21 @@
         # Python class?
         if dtype.startswith('class '):
             dtype = dtype[7:-1]
-            self.hasChilds = True
-        elif dtype == 'classobj':
-            dtype = 'instance'
+            if dtype not in ('method_descriptor', 'wrapper_descriptor'):
+                self.hasChilds = True
         # Qt related stuff?
         elif (dtype.startswith(ConfigQtNames) and
                 dtype.endswith(ConfigKnownQtTypes)):
             self.hasChilds = True
+            
+        elif dtype in ('instance', 'class'):
+            self.hasChilds = True
         
         vtype = ConfigVarTypeDispStrings.get(dtype, dtype)
+        # Unkown types should be expandable by default
+        if (vtype is dtype and
+                dtype not in ('method_descriptor', 'wrapper_descriptor')):
+            self.hasChilds = True
         self.type = QCoreApplication.translate("VariablesViewer", vtype)
     
     def __getValue(self, dtype, dvalue):
@@ -183,7 +189,7 @@
             try:
                 dvalue = str(dvalue)
             except UnicodeDecodeError:  # Never reached under Python 3
-                dvalue = unicode(dvalue, 'utf-8')
+                dvalue = unicode(dvalue, 'utf-8')  # __IGNORE_WARNING__
         
         self.value = dvalue
         

eric ide

mercurial