Skip to content

Commit

Permalink
ruff: UP031
Browse files Browse the repository at this point in the history
  • Loading branch information
jvansanten committed May 23, 2024
1 parent 2e16db2 commit 3ab5474
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ampel/alert/AlertConsumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def report_ingest_error(e: Exception, alert: "AmpelAlertProtocol", filter_result

# Unrecoverable (logging related) errors
except (PyMongoError, AmpelLoggingError) as e: # noqa: PERF203
print("%s: abording run() procedure" % e.__class__.__name__)
print(f"{e.__class__.__name__}: abording run() procedure")
report_filter_error(e, alert, fblock)
raise e

Expand Down Expand Up @@ -354,7 +354,7 @@ def report_ingest_error(e: Exception, alert: "AmpelAlertProtocol", filter_result
alert_extra, alert.extra.get('stock') if alert.extra else None
)
except (PyMongoError, AmpelLoggingError) as e:
print("%s: abording run() procedure" % e.__class__.__name__)
print(f"{e.__class__.__name__}: abording run() procedure")
report_ingest_error(e, alert, filter_results)
raise e

Expand Down
2 changes: 1 addition & 1 deletion ampel/alert/load/TarAlertLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __next__(self) -> IOBase:
# Reach end of archive
if tar_info is None:
if hasattr(self, "file_path"):
self.logger.info("Reached end of tar file %s" % self.file_path)
self.logger.info(f"Reached end of tar file {self.file_path}")
#self.tar_file.close()
else:
self.logger.info("Reached end of tar")
Expand Down

0 comments on commit 3ab5474

Please sign in to comment.