Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
run black
  • Loading branch information
trim21 committed Sep 11, 2024
commit 937bd9debe3ebfc6380771557073d21f39a824f1
16 changes: 8 additions & 8 deletions loguru/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class Logger:
diagnose: bool = ...,
enqueue: bool = ...,
context: Optional[Union[str, BaseContext]] = ...,
catch: bool = ...
catch: bool = ...,
) -> int: ...
@overload
def add(
Expand All @@ -265,7 +265,7 @@ class Logger:
enqueue: bool = ...,
context: Optional[Union[str, BaseContext]] = ...,
catch: bool = ...,
loop: Optional[AbstractEventLoop] = ...
loop: Optional[AbstractEventLoop] = ...,
) -> int: ...
@overload
def add(
Expand All @@ -290,7 +290,7 @@ class Logger:
mode: str = ...,
buffering: int = ...,
encoding: str = ...,
**kwargs: Any
**kwargs: Any,
) -> int: ...
def remove(self, handler_id: Optional[int] = ...) -> None: ...
def complete(self) -> AwaitableCompleter: ...
Expand All @@ -304,7 +304,7 @@ class Logger:
onerror: Optional[Callable[[BaseException], None]] = ...,
exclude: Optional[Union[Type[BaseException], Tuple[Type[BaseException], ...]]] = ...,
default: Any = ...,
message: str = ...
message: str = ...,
) -> Catcher: ...
@overload
def catch(self, function: _F) -> _F: ...
Expand All @@ -318,7 +318,7 @@ class Logger:
raw: bool = ...,
capture: bool = ...,
depth: int = ...,
ansi: bool = ...
ansi: bool = ...,
) -> Logger: ...
def bind(__self, **kwargs: Any) -> Logger: ... # noqa: N805
def contextualize(__self, **kwargs: Any) -> Contextualizer: ... # noqa: N805
Expand Down Expand Up @@ -346,7 +346,7 @@ class Logger:
levels: Optional[Sequence[LevelConfig]] = ...,
extra: Optional[Dict[Any, Any]] = ...,
patcher: Optional[PatcherFunction] = ...,
activation: Optional[Sequence[ActivationConfig]] = ...
activation: Optional[Sequence[ActivationConfig]] = ...,
) -> List[int]: ...
# @staticmethod cannot be used with @overload in mypy (python/mypy#7781).
# However Logger is not exposed and logger is an instance of Logger
Expand All @@ -359,7 +359,7 @@ class Logger:
pattern: Union[str, Pattern[str]],
*,
cast: Union[Dict[str, Callable[[str], Any]], Callable[[Dict[str, str]], None]] = ...,
chunk: int = ...
chunk: int = ...,
) -> Generator[Dict[str, Any], None, None]: ...
@overload
def parse(
Expand All @@ -368,7 +368,7 @@ class Logger:
pattern: Union[bytes, Pattern[bytes]],
*,
cast: Union[Dict[str, Callable[[bytes], Any]], Callable[[Dict[str, bytes]], None]] = ...,
chunk: int = ...
chunk: int = ...,
) -> Generator[Dict[str, Any], None, None]: ...
@overload
def trace(__self, __message: str, *args: Any, **kwargs: Any) -> None: ... # noqa: N805
Expand Down
2 changes: 1 addition & 1 deletion loguru/_file_sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def __init__(
mode="a",
buffering=1,
encoding="utf8",
**kwargs
**kwargs,
):
self.encoding = encoding

Expand Down
2 changes: 1 addition & 1 deletion loguru/_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
error_interceptor,
exception_formatter,
id_,
levels_ansi_codes
levels_ansi_codes,
):
self._name = name
self._sink = sink
Expand Down
6 changes: 3 additions & 3 deletions loguru/_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def add(
enqueue=_defaults.LOGURU_ENQUEUE,
context=_defaults.LOGURU_CONTEXT,
catch=_defaults.LOGURU_CATCH,
**kwargs
**kwargs,
):
r"""Add a handler sending log messages to a sink adequately configured.

Expand Down Expand Up @@ -1136,7 +1136,7 @@ def catch(
default=None,
message="An error has been caught in function '{record[function]}', "
"process '{record[process].name}' ({record[process].id}), "
"thread '{record[thread].name}' ({record[thread].id}):"
"thread '{record[thread].name}' ({record[thread].id}):",
):
"""Return a decorator to automatically log possibly caught error in wrapped function.

Expand Down Expand Up @@ -1293,7 +1293,7 @@ def opt(
raw=False,
capture=True,
depth=0,
ansi=False
ansi=False,
):
r"""Parametrize a logging call to slightly change generated log message.

Expand Down