Skip to content

Commit

Permalink
Improve message provided when plugin IDs collide
Browse files Browse the repository at this point in the history
  • Loading branch information
happz authored and psss committed Oct 16, 2024
1 parent 96d8fe0 commit 6433803
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tmt/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def register_plugin(
# plugin discovery happens in import time, it's very hard to manage
# it. For now, report a warning, but do not raise an exception yet.
logger.warning(
f"Registering plugin '{plugin.__module__}' collides"
f"Registering plugin '{plugin}' collides"
f" with an already registered id '{plugin_id}'"
f" of plugin '{self._plugins[plugin_id]}'.")

Expand Down
3 changes: 3 additions & 0 deletions tmt/steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,9 @@ def __init__(
self.summary: str = lines[0].strip()
self.description: str = '\n'.join(lines[1:])

def __repr__(self) -> str:
return f'<{self.name} from {self.class_.__module__}>'

def describe(self) -> str:
""" Format name and summary for a nice method overview """
return f'{self.name} '.ljust(22, '.') + f' {self.summary}'
Expand Down

0 comments on commit 6433803

Please sign in to comment.