New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT-#4622: Unify data type of log_level in logging module #6992
Conversation
Signed-off-by: arunjose696 <arunjose696@gmail.com>
modin/logging/config.py
Outdated
@@ -36,6 +37,16 @@ | |||
__LOGGER_CONFIGURED__: bool = False | |||
|
|||
|
|||
class LogLevel(IntEnum): # noqa: PR01 | |||
"""Enumerator to Specify the valid values of LogLevel accepted by Logger.setLevel().""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Enumerator to Specify the valid values of LogLevel accepted by Logger.setLevel().""" | |
"""Enumerator to specify the valid values of LogLevel accepted by Logger.setLevel().""" |
Why noqa?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was getting traceback in doc_checker.py that {'value', 'names', 'start', 'type', 'module', 'qualname'} not documented, could see other intEnum using #noqa, so used this in this enum as well.
@@ -27,8 +27,8 @@ def __init__(self, namespace): | |||
self.messages = collections.defaultdict(list) | |||
self.namespace = namespace | |||
|
|||
def info(self, message, *args, **kw): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In previous impl, as log_level was a string the logger was called as below,
logger_level = getattr(logger, log_level)
logger_level(start_line)
now as log level is not a string(but int) this has been changed to call
logger.log(log_level,message)
Co-authored-by: Iaroslav Igoshev <Poolliver868@mail.ru>
What do these changes do?
flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
git commit -s
docs/development/architecture.rst
is up-to-date