Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Aug 8, 2024
1 parent b5c2a05 commit 402a0c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 9 additions & 3 deletions ogcore/output_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def plot_aggregates(
assert reform_tpi is not None
fig1, ax1 = plt.subplots()
for i, v in enumerate(var_list):
assert v in VAR_LABELS.keys(), "{} is not in the list of variable labels".format(v)
assert (
v in VAR_LABELS.keys()
), "{} is not in the list of variable labels".format(v)
if plot_type == "pct_diff":
if v in ["r_gov", "r", "r_p"]:
# Compute just percentage point changes for rates
Expand Down Expand Up @@ -238,7 +240,9 @@ def plot_industry_aggregates(
assert reform_tpi is not None
fig1, ax1 = plt.subplots()
for i, v in enumerate(var_list):
assert v in VAR_LABELS.keys(), "{} is not in the list of variable labels".format(v)
assert (
v in VAR_LABELS.keys()
), "{} is not in the list of variable labels".format(v)
if len(var_list) == 1:
var_label = ""
else:
Expand Down Expand Up @@ -451,7 +455,9 @@ def plot_gdp_ratio(
start_index = start_year - base_params.start_year
fig1, ax1 = plt.subplots()
for i, v in enumerate(var_list):
assert v in ToGDP_LABELS.keys(), "{} is not in the list of variable labels".format(v)
assert (
v in ToGDP_LABELS.keys()
), "{} is not in the list of variable labels".format(v)
if plot_type == "levels":
plot_var_base = (
base_tpi[v][: base_params.T] / base_tpi["Y"][: base_params.T]
Expand Down
4 changes: 3 additions & 1 deletion ogcore/parameter_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ def param_table(p, table_format="tex", path=None):
value = getattr(p, k)
if hasattr(value, "__len__") & ~isinstance(value, str):
if value.ndim > 1:
report = "Too large to report here, see default parameters JSON"
report = (
"Too large to report here, see default parameters JSON"
)
else:
report = (
"["
Expand Down

0 comments on commit 402a0c3

Please sign in to comment.