eric6/DebugClients/Python/DebugClientBase.py

branch
Variables Viewer
changeset 6988
87ad87ef1910
parent 6980
cf9351b063a8
child 7030
73779c4c135a
equal deleted inserted replaced
6982:419c20ec6cd3 6988:87ad87ef1910
179 """ 179 """
180 clientCapabilities = DebugClientCapabilities.HasAll 180 clientCapabilities = DebugClientCapabilities.HasAll
181 181
182 # keep these in sync with VariablesViewer.VariableItem.Indicators 182 # keep these in sync with VariablesViewer.VariableItem.Indicators
183 Indicators = ("()", "[]", "{:}", "{}") # __IGNORE_WARNING_M613__ 183 Indicators = ("()", "[]", "{:}", "{}") # __IGNORE_WARNING_M613__
184 arrayTypes = {
185 'list', 'tuple', 'dict', 'set', 'frozenset', "class 'dict_items'",
186 "class 'dict_keys'", "class 'dict_values'"
187 }
184 188
185 def __init__(self): 189 def __init__(self):
186 """ 190 """
187 Constructor 191 Constructor
188 """ 192 """
1824 "array", "defaultdict") and 1828 "array", "defaultdict") and
1825 not isQt): 1829 not isQt):
1826 valtype = valtypestr 1830 valtype = valtypestr
1827 1831
1828 try: 1832 try:
1829 if valtype in ['list', 'tuple', 'dict', 'set', 'frozenset' 1833 if valtype in self.arrayTypes:
1830 ]:
1831 rvalue = "{0:d}".format(len(value)) 1834 rvalue = "{0:d}".format(len(value))
1832 elif valtype == 'array.array': 1835 elif valtype == 'array.array':
1833 rvalue = "{0:d}|{1}".format( 1836 rvalue = "{0:d}|{1}".format(
1834 len(value), value.typecode) 1837 len(value), value.typecode)
1835 elif valtype == 'collections.defaultdict': 1838 elif valtype == 'collections.defaultdict':

eric ide

mercurial