Skip to content

Commit

Permalink
squash: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
happz authored and lukaszachy committed Feb 26, 2025
1 parent b903af4 commit bffe2c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tmt/utils/hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ def register_hint(id_: str, hint: str) -> None:
Register a hint for users.
:param id_: step name for step-specific hints,
``<step name>/< plugin name>`` for plugin-specific hints,
``<step name>/<plugin name>`` for plugin-specific hints,
or an arbitrary string.
:param hint: a hint to register.
"""

if id_ in HINTS:
raise tmt.utils.GeneralError(
"Registering hint '{id_}' collides with an already registered hint."
f"Registering hint '{id_}' collides with an already registered hint."
)

HINTS[id_] = textwrap.dedent(hint).strip()
Expand Down Expand Up @@ -113,7 +113,7 @@ def _render_single_hint(hint: str) -> str:
hint = HINTS.get(id_)

if hint is None:
raise tmt.utils.GeneralError("Could not find hint '{id_}'.")
raise tmt.utils.GeneralError(f"Could not find hint '{id_}'.")

return _render_single_hint(hint)

Expand Down Expand Up @@ -154,7 +154,7 @@ def _render_mandatory_hints() -> Iterator[str]:
hint = HINTS.get(id_)

if hint is None:
raise tmt.utils.GeneralError("Could not find hint '{id_}'.")
raise tmt.utils.GeneralError(f"Could not find hint '{id_}'.")

yield _render_single_hint(hint)

Expand Down

0 comments on commit bffe2c3

Please sign in to comment.