Bugfix displaying to many characters as default_factory type. Variables Viewer

Wed, 29 May 2019 22:14:02 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Wed, 29 May 2019 22:14:02 +0200
branch
Variables Viewer
changeset 7030
73779c4c135a
parent 7019
a1b25790bc5c

Bugfix displaying to many characters as default_factory type.

eric6/DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
eric6/Debugger/VariablesViewer.py file | annotate | diff | comparison | revisions
--- a/eric6/DebugClients/Python/DebugClientBase.py	Tue May 21 22:44:17 2019 +0200
+++ b/eric6/DebugClients/Python/DebugClientBase.py	Wed May 29 22:14:02 2019 +0200
@@ -1837,7 +1837,7 @@
                             len(value), value.typecode)
                     elif valtype == 'collections.defaultdict':
                         rvalue = "{0:d}|{1}".format(
-                            len(value), value.default_factory)
+                            len(value), value.default_factory.__name__)
                     elif valtype == "numpy.ndarray":
                         rvalue = "x".join(str(x) for x in value.shape)
                     elif valtypename == "MultiValueDict":
--- a/eric6/Debugger/VariablesViewer.py	Tue May 21 22:44:17 2019 +0200
+++ b/eric6/Debugger/VariablesViewer.py	Wed May 29 22:14:02 2019 +0200
@@ -176,7 +176,7 @@
         """
         if dtype == 'collections.defaultdict':
             dvalue, default_factory = dvalue.split('|')
-            self.indicator = '{{:<{0}>}}'.format(default_factory[7:-2])
+            self.indicator = '{{:<{0}>}}'.format(default_factory)
         elif dtype == 'array.array':
             dvalue, typecode = dvalue.split('|')
             self.indicator = '[<{0}>]'.format(typecode)

eric ide

mercurial