Skip to content

Fix/eliminate warnings #1210

Fix/eliminate warnings

Fix/eliminate warnings #1210

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / Black failed Oct 12, 2023 in 0s

1 error

Black found 1 error

Annotations

Check failure on line 425 in /home/runner/work/oemof-solph/oemof-solph/src/oemof/solph/views.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/oemof-solph/oemof-solph/src/oemof/solph/views.py#L404-L425

     labels = [s for s, t in x]
 
     dataframes = []
 
     for lb in labels:
-        subset = df.T.groupby(
-            lambda x1: (
-                lambda fr, to, ty: "output"
-                if (fr == lb and ty == "flow")
-                else "input"
-                if (to == lb and ty == "flow")
-                else "level"
-                if (fr == lb and ty != "flow")
-                else None
-            )(*x1)
-        ).sum().T
+        subset = (
+            df.T.groupby(
+                lambda x1: (
+                    lambda fr, to, ty: "output"
+                    if (fr == lb and ty == "flow")
+                    else "input"
+                    if (to == lb and ty == "flow")
+                    else "level"
+                    if (fr == lb and ty != "flow")
+                    else None
+                )(*x1)
+            )
+            .sum()
+            .T
+        )
 
         subset["net_flow"] = subset["output"] - subset["input"]
 
         subset.columns = pd.MultiIndex.from_product(
             [[lb], [o for o in lb.outputs], subset.columns]