Skip to content

Commit 0a69c87

Browse files
committed
fix(logging): fix lint
1 parent 9014116 commit 0a69c87

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/corva/logger.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ def __enter__(self):
257257
# (avoids AWS root duplication) while still exporting logs via OTel.
258258

259259
if not SETTINGS.OTEL_LOG_SENDING_DISABLED:
260-
with suppress(Exception): # Fail-safe: never break logging if detection fails
260+
# Fail-safe: never break logging if detection fails
261+
with suppress(Exception):
261262
for handler in _gather_otel_handlers_from_root():
262263
if handler not in handlers:
263264
handlers.append(handler)

tests/unit/test_logging.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ def app(event, api):
330330
assert 'The app failed to execute.' in captured.err
331331

332332

333-
@pytest.mark.parametrize("handler_cls_name", ("opentelemetry", "otel"))
334-
def test__otel_handler_passed_to_logging_context__success(monkeypatch, handler_cls_name):
333+
@pytest.mark.parametrize("cls_name", ("opentelemetry", "otel"))
334+
def test__otel_handler_passed_to_logging_context__success(monkeypatch, cls_name):
335335

336336
otel_handler = MagicMock()
337-
otel_handler.__class__.__name__ = handler_cls_name
337+
otel_handler.__class__.__name__ = cls_name
338338

339339
# Attach to the root logger
340340
logging.getLogger().addHandler(otel_handler)

0 commit comments

Comments
 (0)