Skip to content

Commit 95eef1a

Browse files
committed
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.
1 parent 000fcd6 commit 95eef1a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roundup/backends/back_anydbm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def fix_journal(self, classname, journal):
583583
return journal
584584
for j in journal:
585585
if j[3] == 'set':
586-
for k, _v in j[4].items():
586+
for k in j[4].keys():
587587
if k in pwprops and j[4][k]:
588588
j[4][k] = password.JournalPassword(j[4][k])
589589
return journal

roundup/backends/rdbms_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def post_init(self):
342342
tables[classname] = spec.schema()
343343
save = 1
344344

345-
for classname, _spec in list(tables.items()):
345+
for classname in list(tables.keys()):
346346
if classname not in self.classes:
347347
self.drop_class(classname, tables[classname])
348348
del tables[classname]
@@ -2338,7 +2338,7 @@ def find(self, **propspec):
23382338

23392339
# validate the args
23402340
props = self.getprops()
2341-
for propname, _nodeids in propspec.items():
2341+
for propname in propspec.keys():
23422342
# check the prop is OK
23432343
prop = props[propname]
23442344
if not isinstance(prop, Link) and not isinstance(prop, Multilink):

0 commit comments

Comments
 (0)