Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve message provided when plugin IDs collide #3288

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading