From a9055a7af43283a2a3b2facca2f07882eff15f57 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Wed, 29 May 2024 14:05:06 +1200 Subject: [PATCH] chore: remove f-string in logging call (#1234) Use lazy interpolation in `logging.*` calls. Missed in #1227, because I didn't think to enable multi-line searching, and this logging call wraps the f-string on to the next line. --- ops/framework.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ops/framework.py b/ops/framework.py index 1b71d68f5..661c6959d 100644 --- a/ops/framework.py +++ b/ops/framework.py @@ -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 ) if event.deferred: