Skip to content

Commit 28075b6

Browse files
committed
Fixing backwards compatibility with test coverage. This broke wolph/numpy-stl#195
1 parent 2bd64dc commit 28075b6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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)