eric6/DebugClients/Python/DebugVariables.py

branch
maintenance
changeset 7642
72721823d453
parent 7639
422fd05e9c91
child 7862
817ef8e0fa66
child 7924
8a96736d465e
diff -r f7cb83647621 -r 72721823d453 eric6/DebugClients/Python/DebugVariables.py
--- a/eric6/DebugClients/Python/DebugVariables.py	Sun May 31 17:26:46 2020 +0200
+++ b/eric6/DebugClients/Python/DebugVariables.py	Sat Jul 04 11:45:34 2020 +0200
@@ -7,17 +7,12 @@
 Module implementing classes and functions to dump variable contents.
 """
 
-import sys
-
 from DebugConfig import ConfigQtNames, ConfigKnownQtTypes, BatchSize
 
 #
 # This code was inspired by pydevd.
 #
 
-if sys.version_info[0] > 2:
-    basestring = str
-
 ############################################################
 ## Classes implementing resolvers for various compund types
 ############################################################
@@ -58,7 +53,7 @@
             try:
                 attribute = getattr(var, name)
                 d[name] = attribute
-            except Exception:
+            except Exception:       # secok
                 pass    # if we can't get it, simply ignore it
         
         return d
@@ -91,7 +86,7 @@
             try:
                 attribute = getattr(var, name)
                 d[name] = attribute
-            except Exception:
+            except Exception:       # secok
                 pass    # if we can't get it, simply ignore it
         
         yield -1, d
@@ -141,7 +136,7 @@
         @return string representation of the given key
         @rtype str
         """
-        if isinstance(key, basestring):
+        if isinstance(key, str):
             key = repr(key)
             # Special handling for Python2 unicode strings and bytes object
             # Raw and f-Strings are always converted to (unicode) str
@@ -653,12 +648,12 @@
     
     try:
         _TypeMap.append((long, None))           # __IGNORE_WARNING__
-    except Exception:
+    except Exception:       # secok
         pass    # not available on all Python versions
 
     try:
         _TypeMap.append((unicode, None))        # __IGNORE_WARNING__
-    except Exception:
+    except Exception:       # secok
         pass    # not available on all Python versions
 
     try:
@@ -720,6 +715,3 @@
             resolver = defaultResolver
     
     return typeName, typeStr, resolver
-
-#
-# eflag: noqa = M702

eric ide

mercurial