Mercurial > p > roundup > code
diff roundup/backends/rdbms_common.py @ 7038:f524ddc27af8
replace for a,b in x.items() with for a in x.keys()
where the value from items is not used.
Recommended refactor from Tom Ekberg after seeing flake8 fixes for
unused loop variables.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 12 Oct 2022 22:16:56 -0400 |
| parents | 05d81de0d92d |
| children | ca90f7270cd4 506c86823abb |
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py Mon Oct 10 15:43:13 2022 -0400 +++ b/roundup/backends/rdbms_common.py Wed Oct 12 22:16:56 2022 -0400 @@ -342,7 +342,7 @@ tables[classname] = spec.schema() save = 1 - for classname, _spec in list(tables.items()): + for classname in list(tables.keys()): if classname not in self.classes: self.drop_class(classname, tables[classname]) del tables[classname] @@ -2338,7 +2338,7 @@ # validate the args props = self.getprops() - for propname, _nodeids in propspec.items(): + for propname in propspec.keys(): # check the prop is OK prop = props[propname] if not isinstance(prop, Link) and not isinstance(prop, Multilink):
