Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Use unambiguous variable names for label loops
Browse files Browse the repository at this point in the history
Flake8 reports the temporary variable as ambiguous, fair enough. Use a
more descriptive name.

Signed-off-by: Darren Hart <[email protected]>
  • Loading branch information
dvhart committed Jun 21, 2020
1 parent 4f89ead commit c243d7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions thicket_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ def parse_plant(filepath):
labels = {}
p_labels = {}
# Store only the first label per locale
for l in p.labels.items():
p_labels[l[0]] = l[1][0]
for label in p.labels.items():
p_labels[label[0]] = label[1][0]
labels[p.name] = p_labels

models = {}
Expand All @@ -305,8 +305,8 @@ def parse_plant(filepath):
models[m.name] = m_rec
m_labels = {}
# FIXME: highly redundant
for l in m.labels.items():
m_labels[l[0]] = l[1][0]
for label in m.labels.items():
m_labels[label[0]] = label[1][0]
labels[m.name] = m_labels
i = i + 1
plant["models"] = models
Expand Down

0 comments on commit c243d7e

Please sign in to comment.