Skip to content

Commit

Permalink
Fix code style issues with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
lint-action committed Sep 14, 2023
1 parent 43b6e80 commit cd9067d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 0 additions & 6 deletions automate_mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def automate_mkdocs_from_docstring(
structure = fix(defaultdict)()
full_repo_dir = str(repo_dir) + "/"
for script in scripts:

with open(script, "r") as source:
tree = ast.parse(source.read())
funcs = {"classes": [], "functions": []}
Expand All @@ -60,7 +59,6 @@ def automate_mkdocs_from_docstring(
child, (ast.FunctionDef, ast.ClassDef, ast.AsyncFunctionDef)
):
if child.name not in ["main"]:

relative_path = (
str(script)
.replace(full_repo_dir, "")
Expand Down Expand Up @@ -113,10 +111,8 @@ def automate_mkdocs_from_docstring(
if match_string in contents[-1]:
contents.append(insert_string)
else:

for index, line in enumerate(contents):
if match_string in line and insert_string not in contents[index + 1]:

contents = contents[: index + 1]
contents.append(insert_string)
break
Expand Down Expand Up @@ -160,10 +156,8 @@ def automate_nav_structure(
if match_string in contents[-1]:
contents.append(insert_string)
else:

for index, line in enumerate(contents):
if match_string in line and insert_string not in contents[index + 1]:

contents = contents[: index + 1]
contents.append(insert_string)
break
Expand Down
4 changes: 3 additions & 1 deletion src/plotting/plotter_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ def compare_nw_scenarios(areas, optimal_growth_rate):
# Add one to the years, so that the first year is 1
all_medians.index = all_medians.index + 1
# plot them all in the same subplot as bar plots
ax = all_medians.plot.bar(color=colors, edgecolor="black", linewidth=0.1, legend=False)
ax = all_medians.plot.bar(
color=colors, edgecolor="black", linewidth=0.1, legend=False
)
# Create a custom legend for the plot with 7 columns
custom_lines = [
Line2D([0], [0], color=colors["150 Tg"], lw=4),
Expand Down

0 comments on commit cd9067d

Please sign in to comment.