fix(generic_api): keep the mutable-ok suppression on the annotated line

ruff format wraps the long annotation; the suppression comment belongs on
the first line of the statement, where the LIT001 violation is emitted.
This commit is contained in:
sun04222 2026-10-24 10:24:40 +08:00
parent bf0be8b237
commit 8f24094a10

View file

@ -376,9 +376,9 @@ class GenericAPILogger(CustomBatchLogger):
batch: Final = tuple(self.log_queue)
if not batch:
return
failed_events: Final[
failed_events: Final[ # mutable-ok: filled while the send runs and drained into the queue in finally
list[Mapping[str, object] | StandardLoggingPayload]
] = [] # mutable-ok: filled while the send runs and drained into the queue in finally
] = []
try:
verbose_logger.debug(
"Generic API Logger - about to flush %s events in '%s' format", len(batch), self.log_format