Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
fshowalter committed Dec 9, 2024
1 parent 50700e7 commit 89a2dd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions booklog/utils/logging.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys as _sys
from typing import TYPE_CHECKING, Any, Callable, Sequence, Type, TypeVar
from typing import TYPE_CHECKING, Any, Callable, Sequence, TypeVar

from loguru import BasicHandlerConfig
from loguru import logger as _base_logger
Expand Down Expand Up @@ -42,8 +42,8 @@ def log(self, message: str, *args: Any, **kwargs: Any) -> None:
message_with_color, *args, **kwargs
) # noqa: WPS221

def catch(self, exception: Type[BaseException]) -> Function[None]:
return self.logger.catch(exception=exception)
def catch(self, function: Function[None]) -> Function[None]:
return self.logger.catch(function=function)


logger: ExtendedLogger = ExtendedLogger(_base_logger.opt(colors=True))

0 comments on commit 89a2dd4

Please sign in to comment.