eric7/DebugClients/Python/DebugClientBase.py

branch
eric7
changeset 8573
77845f40ebfe
parent 8568
890dfe038613
child 8881
54e42bc2437a
equal deleted inserted replaced
8572:718f80d8bcde 8573:77845f40ebfe
1625 only added to the list, if their type is not contained 1625 only added to the list, if their type is not contained
1626 in the filter list and their name doesn't match any of the filter 1626 in the filter list and their name doesn't match any of the filter
1627 expressions. The formated variables list (a list of tuples of 3 1627 expressions. The formated variables list (a list of tuples of 3
1628 values) is returned. 1628 values) is returned.
1629 1629
1630 @param dict_ the dictionary to be scanned 1630 @param variables variables list to be processed
1631 @type dict 1631 @type list of tuple of (str, Any) or (str, str, Any)
1632 @param scope 1 to filter using the globals filter, 0 using the locals 1632 @param scope 1 to filter using the globals filter, 0 using the locals
1633 filter. 1633 filter.
1634 Variables are only added to the list, if their name do not match 1634 Variables are only added to the list, if their name do not match
1635 any of the filter expressions. 1635 any of the filter expressions.
1636 @type int 1636 @type int
1755 def_factory = value.default_factory.__name__ 1755 def_factory = value.default_factory.__name__
1756 indicator = '{{:<{0}>}}'.format(def_factory) 1756 indicator = '{{:<{0}>}}'.format(def_factory)
1757 elif valtype == "numpy.ndarray" and length > -1: 1757 elif valtype == "numpy.ndarray" and length > -1:
1758 length = "x".join(str(x) for x in value.shape) 1758 length = "x".join(str(x) for x in value.shape)
1759 elif valtype.endswith(".MultiValueDict"): 1759 elif valtype.endswith(".MultiValueDict"):
1760 indicator = "{:}" 1760 indicator = "{:}" # __IGNORE_WARNING__
1761 valtype = "django.MultiValueDict" # shortened type 1761 valtype = "django.MultiValueDict" # shortened type
1762 break 1762 break
1763 else: 1763 else:
1764 rvalue = repr(value) 1764 rvalue = repr(value)
1765 1765
1782 @param filterString string of filter patterns separated by ';' 1782 @param filterString string of filter patterns separated by ';'
1783 """ 1783 """
1784 patternFilterObjects = None 1784 patternFilterObjects = None
1785 if filterString.strip(): 1785 if filterString.strip():
1786 pattern = filterString.replace(';', '|') 1786 pattern = filterString.replace(';', '|')
1787 try: 1787 with contextlib.suppress(re.error):
1788 patternFilterObjects = re.compile(pattern) 1788 patternFilterObjects = re.compile(pattern)
1789 except re.error:
1790 pass
1791 1789
1792 if scope: 1790 if scope:
1793 self.globalsFilterObjects = patternFilterObjects 1791 self.globalsFilterObjects = patternFilterObjects
1794 else: 1792 else:
1795 self.localsFilterObjects = patternFilterObjects 1793 self.localsFilterObjects = patternFilterObjects

eric ide

mercurial