Skip to content

Commit 0405ec3

Browse files
committed
Merge branch 'release/3.2.2'
2 parents 4d58a9b + 3e00ab5 commit 0405ec3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

python_utils/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
'with the standard Python install')
77
__url__: str = 'https://github.com/WoLpH/python-utils'
88
# Omit type info due to automatic versioning script
9-
__version__ = '3.2.1'
9+
__version__ = '3.2.2'

python_utils/logger.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,27 @@ class Logged(LoggerBase):
7575
>>> class MyClass(Logged):
7676
... def __init__(self):
7777
... Logged.__init__(self)
78+
7879
>>> my_class = MyClass()
7980
>>> my_class.debug('debug')
8081
>>> my_class.info('info')
8182
>>> my_class.warning('warning')
8283
>>> my_class.error('error')
8384
>>> my_class.exception('exception')
8485
>>> my_class.log(0, 'log')
86+
87+
>>> my_class._Logged__get_name('spam')
88+
'spam'
8589
'''
8690

8791
logger: logging.Logger
8892

8993
@classmethod
9094
def __get_name(cls, *name_parts: str) -> str:
91-
return cls._LoggerBase__get_name(*name_parts)
95+
return LoggerBase._LoggerBase__get_name(*name_parts) # type: ignore
9296

9397
def __new__(cls, *args, **kwargs):
9498
cls.logger = logging.getLogger(
95-
cls._LoggerBase__get_name(cls.__module__, cls.__name__)
99+
cls.__get_name(cls.__module__, cls.__name__)
96100
)
97101
return super(Logged, cls).__new__(cls)

0 commit comments

Comments
 (0)