Skip to content

Commit e3670f9

Browse files
Apply suggestions from code review
Co-authored-by: Daniel Szoke <[email protected]>
1 parent 8397b10 commit e3670f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sentry_sdk/integrations/loguru.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
if TYPE_CHECKING:
1414
from logging import LogRecord
15-
from typing import Any, Optional, Tuple
15+
from typing import Any, Optional
1616

1717
try:
1818
import loguru
@@ -51,7 +51,7 @@ class LoggingLevels(enum.IntEnum):
5151

5252

5353
def _loguru_level_to_otel(record_level):
54-
# type: (int) -> Tuple[int, str]
54+
# type: (int) -> tuple[int, str]
5555
for py_level, otel_severity_number, otel_severity_text in [
5656
(LoggingLevels.CRITICAL, 21, "fatal"),
5757
(LoggingLevels.ERROR, 17, "error"),
@@ -74,7 +74,7 @@ class LoguruIntegration(Integration):
7474
event_level = DEFAULT_EVENT_LEVEL # type: Optional[int]
7575
breadcrumb_format = DEFAULT_FORMAT
7676
event_format = DEFAULT_FORMAT
77-
sentry_logs_level = DEFAULT_LEVEL # type: Optional[int]
77+
sentry_logs_level = DEFAULT_LEVEL # type: Optional[LoggingLevels]
7878

7979
def __init__(
8080
self,
@@ -84,7 +84,7 @@ def __init__(
8484
event_format=DEFAULT_FORMAT,
8585
sentry_logs_level=DEFAULT_LEVEL,
8686
):
87-
# type: (Optional[int], Optional[int], str | loguru.FormatFunction, str | loguru.FormatFunction, Optional[int]) -> None
87+
# type: (Optional[int], Optional[int], str | loguru.FormatFunction, str | loguru.FormatFunction, Optional[LoggingLevels]) -> None
8888
LoguruIntegration.level = level
8989
LoguruIntegration.event_level = event_level
9090
LoguruIntegration.breadcrumb_format = breadcrumb_format

0 commit comments

Comments
 (0)