mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fix pylance problem in logger
This commit is contained in:
parent
f955184260
commit
3761d0bbe7
1 changed files with 7 additions and 1 deletions
|
|
@ -1,7 +1,13 @@
|
|||
import logging
|
||||
from os import PathLike
|
||||
from typing import Optional, Union
|
||||
|
||||
|
||||
def setup_logger(log_file=None, level=logging.INFO, overwrite_handler=False):
|
||||
def setup_logger(
|
||||
log_file: Optional[Union[str, PathLike[str]]] = None,
|
||||
level: int = logging.INFO,
|
||||
overwrite_handler: bool = False,
|
||||
) -> logging.Logger:
|
||||
# Create a logger and set the logging level
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(level)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue