Skip to content

Commit eb7ea12

Browse files
committed
fix: type logger methods more generally.
1 parent c8514ad commit eb7ea12

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "setuplog"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
description = ""
55
authors = []
66
license = "MIT"

src/setuplog/logger.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,31 @@ def get_logger() -> logging.Logger:
5050

5151

5252
class _Logging(object):
53-
def debug(self, msg: Union[str, M], *args: Any, **kwargs: Any) -> None:
53+
def debug(self, msg: Union[object, str, M], *args: Any, **kwargs: Any) -> None:
5454
logger = get_logger()
5555
logger.debug(msg, *args, **kwargs)
5656

57-
def info(self, msg: Union[str, M], *args: Any, **kwargs: Any) -> None:
57+
def info(self, msg: Union[object, str, M], *args: Any, **kwargs: Any) -> None:
5858
logger = get_logger()
5959
logger.info(msg, *args, **kwargs)
6060

61-
def warning(self, msg: Union[str, M], *args: Any, **kwargs: Any) -> None:
61+
def warning(self, msg: Union[object, str, M], *args: Any, **kwargs: Any) -> None:
6262
logger = get_logger()
6363
logger.warning(msg, *args, **kwargs)
6464

65-
def error(self, msg: Union[str, M], *args: Any, **kwargs: Any) -> None:
65+
def error(self, msg: Union[object, str, M], *args: Any, **kwargs: Any) -> None:
6666
logger = get_logger()
6767
logger.error(msg, *args, **kwargs)
6868

69-
def exception(self, msg: Union[str, M], *args: Any, exc_info=True, **kwargs: Any) -> None:
69+
def exception(self, msg: Union[object, str, M], *args: Any, exc_info=True, **kwargs: Any) -> None:
7070
logger = get_logger()
7171
logger.exception(msg, *args, exc_info=exc_info, **kwargs)
7272

73-
def critical(self, msg: Union[str, M], *args: Any, **kwargs: Any) -> None:
73+
def critical(self, msg: Union[object, str, M], *args: Any, **kwargs: Any) -> None:
7474
logger = get_logger()
7575
logger.critical(msg, *args, **kwargs)
7676

77-
def log(self, level: int, msg: Union[str, M], *args: Any, **kwargs: Any) -> None:
77+
def log(self, level: int, msg: Union[object, str, M], *args: Any, **kwargs: Any) -> None:
7878
logger = get_logger()
7979
logger.log(level, msg, *args, **kwargs)
8080

0 commit comments

Comments
 (0)