Enable flake8-logging (LOG) rules

This commit is contained in:
Adam Turner 2024-01-04 04:16:13 +00:00
parent df6ac6044f
commit e570f56022
2 changed files with 5 additions and 2 deletions

View File

@ -120,7 +120,10 @@ select = [
# flake8-implicit-str-concat ('ISC') # flake8-implicit-str-concat ('ISC')
# NOT YET USED # NOT YET USED
# flake8-logging ('LOG') # flake8-logging ('LOG')
# NOT YET USED "LOG001", # Use `logging.getLogger()` to instantiate loggers
"LOG002", # Use `__name__` with `logging.getLogger()`
"LOG007", # Use of `logging.exception` with falsy `exc_info`
"LOG009", # Use of undocumented `logging.WARN` constant
# pep8-naming ('N') # pep8-naming ('N')
# NOT YET USED # NOT YET USED
# numpy-specific rules ('NPY') # numpy-specific rules ('NPY')

View File

@ -264,5 +264,5 @@ class TestSigElementFallbackTransform:
# extract messages # extract messages
messages = caplog.record_tuples messages = caplog.record_tuples
stdout = [message for _, lvl, message in messages if lvl == logging.INFO] stdout = [message for _, lvl, message in messages if lvl == logging.INFO]
stderr = [message for _, lvl, message in messages if lvl == logging.WARN] stderr = [message for _, lvl, message in messages if lvl == logging.WARNING]
return document, stdout, stderr return document, stdout, stderr