Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: remove f-string in logging call #1234

Merged
merged 2 commits into from
May 29, 2024
Merged
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
4 changes: 2 additions & 2 deletions ops/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,9 +951,9 @@ def _reemit(self, single_event_path: Optional[str] = None):

else:
logger.warning(
f'Reference to ops.Object at path {observer_path} has been garbage collected '
'Reference to ops.Object at path %s has been garbage collected '
'between when the charm was initialised and when the event was emitted. '
'Make sure sure you store a reference to the observer.'
'Make sure sure you store a reference to the observer.', observer_path
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised Ruff doesn't put observer_path on its own line.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would if there was a trailing comma.

or if the line was too long and had to be split.

)

if event.deferred:
Expand Down
Loading