Skip to content

Commit

Permalink
Make new version of Black happy
Browse files Browse the repository at this point in the history
  • Loading branch information
uvchik committed Feb 25, 2022
1 parent bc136c8 commit c0c2464
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/deflex/postprocessing/graph.py
Expand Up @@ -381,7 +381,7 @@ def _create_di_graph(self, weight_exponent=0):
label="{0} -> {1}".format(
label2str(e.nodes[0].label), label2str(e.nodes[1].label)
),
weigth=format(e.weight * 10 ** weight_exponent, ".1f"),
weigth=format(e.weight * 10**weight_exponent, ".1f"),
color=getattr(e, "color", self.default_edge_color),
)
return graph
Expand Down
20 changes: 9 additions & 11 deletions tests/test_views.py
Expand Up @@ -54,17 +54,15 @@ def test_aggregated_lines(self):
]

def test_aggregated_power_plants(self):
assert (
list(
self.df_agg.loc[
(slice(None)),
("in", "power plant", slice(None), "natural gas"),
]
.sum()
.index.get_level_values(2)
)
== ["all"]
)
assert list(
self.df_agg.loc[
(slice(None)),
("in", "power plant", slice(None), "natural gas"),
]
.sum()
.index.get_level_values(2)
) == ["all"]

assert sorted(
list(
self.df.loc[
Expand Down

0 comments on commit c0c2464

Please sign in to comment.