diff -r bb4d5692f966 -r 720247f98e1f eric6/DebugClients/Python/DebugClientBase.py --- a/eric6/DebugClients/Python/DebugClientBase.py Mon Apr 22 10:38:32 2019 +0200 +++ b/eric6/DebugClients/Python/DebugClientBase.py Sat Apr 27 22:06:38 2019 +0200 @@ -1533,7 +1533,14 @@ # If found, get the details of attribute if variable is not None: typeName, typeStr, resolver = DebugVariables.getType(variable) - if typeStr.startswith(ConfigQtNames): + if resolver: + varGen = resolver.getDictionary(variable) + self.resolverCache[scope][str(var)] = varGen + + idx, varDict = next(varGen) + varlist = self.__formatVariablesList( + varDict, scope, filterList) + else: # Gently handle exception which could occure as special # cases, e.g. already deleted C++ objects, str conversion.. try: @@ -1541,13 +1548,6 @@ except Exception: varlist = [] idx = -1 - elif resolver: - varGen = resolver.getDictionary(variable) - self.resolverCache[scope][str(var)] = varGen - - idx, varDict = next(varGen) - varlist = self.__formatVariablesList( - varDict, scope, filterList) var.insert(0, idx) @@ -1781,44 +1781,49 @@ if key == '__builtins__': rvalue = '<module __builtin__ (built-in)>' valtype = 'module' + if ConfigVarTypeStrings.index(valtype) in filterList: + continue else: + isQt = False + # valtypestr, e.g. class 'PyQt5.QtCore.QPoint' valtypestr = str(type(value))[1:-1] _, valtype = valtypestr.split(' ', 1) + # valtype, e.g. PyQt5.QtCore.QPoint valtype = valtype[1:-1] # Strip 'instance' to be equal with Python 3 if valtype == "instancemethod": valtype = "method" + elif valtype == "type" or valtype == "classobj": + valtype = "class" + # valtypename, e.g. QPoint valtypename = type(value).__name__ try: if ConfigVarTypeStrings.index(valtype) in filterList: continue except ValueError: - if valtype == "classobj": - if ConfigVarTypeStrings.index( - 'instance') in filterList: + if valtype == "sip.enumtype": + if ConfigVarTypeStrings.index('class') in filterList: continue - elif valtype == "sip.methoddescriptor": + elif (valtype == "sip.methoddescriptor" or + valtype == "method_descriptor"): if ConfigVarTypeStrings.index('method') in filterList: continue - elif valtype == "sip.enumtype": - if ConfigVarTypeStrings.index('class') in filterList: - continue - elif not valtype.startswith(("PySide.", "PySide2.")) and \ - (ConfigVarTypeStrings.index('other') in - filterList): - continue - elif valtype in ["numpy.ndarray", "array.array"]: + elif valtype in ("numpy.ndarray", "array.array"): if ConfigVarTypeStrings.index('list') in filterList: continue elif valtypename == "MultiValueDict": if ConfigVarTypeStrings.index('dict') in filterList: continue + elif ConfigVarTypeStrings.index('instance') in filterList: + continue + isQt = valtype.startswith(ConfigQtNames) if (not valtypestr.startswith('type ') and - valtypename not in - ["ndarray", "MultiValueDict", "array"] and - not valtype.startswith(('PyQt5.', 'PyQt4.'))): + valtypename not in ( + "ndarray", "MultiValueDict", "array", + "defaultdict" + ) and not isQt): # __IGNORE_WARNING_E123__ valtype = valtypestr try: @@ -1838,11 +1843,9 @@ valtype = "django.MultiValueDict" # shortened type else: rvalue = repr(value) - if valtype.startswith('class') and \ - rvalue[0] in ['{', '(', '[']: + if valtype.startswith('class') and rvalue[0] in '{([': rvalue = "" - elif (rvalue.startswith("<class '") and - valtype.startswith(ConfigQtNames)): + elif (isQt and rvalue.startswith("<class '")): rvalue = rvalue[8:-2] except Exception: rvalue = ''