Skip to content

Commit

Permalink
[#35] Make flake8 happier
Browse files Browse the repository at this point in the history
  • Loading branch information
machallboyd committed May 11, 2022
1 parent b6ed565 commit 9514811
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mappymatch/maps/nx/nx_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, graph: nx.MultiDiGraph):
def _strip_verbose_data(self):
too_verbose = ("_nodes", "_roads")
base_dict = {
k: v for k, v in self.__dict__.items() if not k in too_verbose
k: v for k, v in self.__dict__.items() if k not in too_verbose
}
for label in too_verbose:
member_len = len(eval(f"self.{label}"))
Expand Down
7 changes: 3 additions & 4 deletions mappymatch/matchers/lcss/lcss.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ def __init__(
self.distance_threshold = distance_threshold

def _string_rep(self):
return (
"LCSSMatcher("
+ ", ".join(f"{k}: {v}" for k, v in self.__dict__.items())
+ ")"
base_dict_str = ", ".join(
f"{k}: {v}" for k, v in self.__dict__.items()
)
return "LCSSMatcher(" + base_dict_str + ")"

def __repr__(self):
return self._string_rep()
Expand Down

0 comments on commit 9514811

Please sign in to comment.