1212
1313if TYPE_CHECKING :
1414 from logging import LogRecord
15- from typing import Any , Optional , Tuple
15+ from typing import Any , Optional
1616
1717try :
1818 import loguru
@@ -51,7 +51,7 @@ class LoggingLevels(enum.IntEnum):
5151
5252
5353def _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