Skip to content

Commit

Permalink
add sorely needed f to format error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
DLWoodruff committed May 1, 2024
1 parent 1b638e6 commit f4f4b2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyomo/contrib/iis/mis.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,15 @@ def _get_constraint(modified_model, v):
constr = modified_model.find_component(v.local_name[len("_slack_plus_") :])
if constr is None:
raise RuntimeError(
"Bad constraint name {v.local_name[len('_slack_plus_'):]}"
f"Bad constraint name {v.local_name[len('_slack_plus_'):]}"
)
return constr
elif "_slack_minus_" in v.name:
constr = modified_model.find_component(v.local_name[len("_slack_minus_") :])
if constr is None:
raise RuntimeError(
"Bad constraint name {v.local_name[len('_slack_minus_'):]}"
f"Bad constraint name {v.local_name[len('_slack_minus_'):]}"
)
return constr
else:
raise RuntimeError("Bad var name {v.name}")
raise RuntimeError(f"Bad var name {v.name}")

0 comments on commit f4f4b2c

Please sign in to comment.