diff --git a/gui/wxpython/core/toolboxes.py b/gui/wxpython/core/toolboxes.py index 1d58d59f867..c10167b639a 100644 --- a/gui/wxpython/core/toolboxes.py +++ b/gui/wxpython/core/toolboxes.py @@ -342,8 +342,8 @@ def _indent(elem, level=0): elem.text = i + " " if not elem.tail or not elem.tail.strip(): elem.tail = i - for elem in elem: - _indent(elem, level + 1) + for _elem in elem: + _indent(_elem, level + 1) if not elem.tail or not elem.tail.strip(): elem.tail = i else: diff --git a/pyproject.toml b/pyproject.toml index 8fd08eb3d75..099c45994f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -336,7 +336,6 @@ ignore = [ "B008", # function-call-in-default-argument "B009", # get-attr-with-constant "B015", # useless-comparison - "B020", # loop-variable-overrides-iterator "B023", # function-uses-loop-variable "B026", # star-arg-unpacking-after-keyword-arg "B028", # no-explicit-stacklevel diff --git a/scripts/r.in.wms/wms_cap_parsers.py b/scripts/r.in.wms/wms_cap_parsers.py index bf001d5d145..5435fe29591 100644 --- a/scripts/r.in.wms/wms_cap_parsers.py +++ b/scripts/r.in.wms/wms_cap_parsers.py @@ -234,17 +234,17 @@ def _inhNotSame(self, element_name, cmp_type, layer, parent_layer, add_arg=None) continue is_there = False - for elem in elem: + for _elem in elem: cmp_text = None if cmp_type == "attribute": - if add_arg in elem.attrib: - cmp_text = elem.attrib[add_arg] + if add_arg in _elem.attrib: + cmp_text = _elem.attrib[add_arg] elif cmp_type == "element_content": - cmp_text = elem.text + cmp_text = _elem.text elif cmp_type == "child_element_content": - cmp = elem.find(self.xml_ns.Ns(add_arg)) + cmp = _elem.find(self.xml_ns.Ns(add_arg)) if cmp is not None: cmp_text = cmp.text