Skip to content

Commit

Permalink
use .items()
Browse files Browse the repository at this point in the history
  • Loading branch information
yonnorc42 committed Jul 12, 2024
1 parent 78377ff commit b5dfc9a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bfasst/utils/structural.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,9 @@ def init_matching_instances(self):
)

self.possible_matches[named_instance] = instances_matching.copy()

possible_matches = {}
# pylint: disable=consider-using-dict-items
for named_instance in self.possible_matches:
possible_matches[named_instance.name] = [
i.name for i in self.possible_matches[named_instance]
]
# pylint: enable=consider-using-dict-items
for named_instance, possibilities in self.possible_matches.items():
possible_matches[named_instance.name] = [i.name for i in possibilities]
with open(possible_matches_cache_path, "wb") as f:
pickle.dump(possible_matches, f)

Expand Down

0 comments on commit b5dfc9a

Please sign in to comment.