enable flake8 logging checks in ruff
Enable flake8-logging and flake8-logging-format checks to ensure we use the correct logging style. Change-Id: Ic4e38d31955412a3b8cf5810d8e75d0ce8178881 Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
This commit is contained in:
parent
982647d99b
commit
27434e48e4
@ -9,6 +9,8 @@ ignore = ["D001"]
|
||||
select = [
|
||||
"E", # pycodestyle (error)
|
||||
"F", # pyflakes
|
||||
"G", # flake8-logging-format
|
||||
"LOG", # flake8-logging
|
||||
"S", # flake8-bandit
|
||||
]
|
||||
|
||||
|
@ -103,7 +103,7 @@ class Field(object):
|
||||
|
||||
logging.warning(
|
||||
'Applying default "%s" on required, but missing '
|
||||
'attribute "%s"' % (self._default, path))
|
||||
'attribute "%s"', self._default, path)
|
||||
|
||||
# Do not run the adapter on the default value
|
||||
return self._default
|
||||
|
@ -269,8 +269,8 @@ class MessageRegistryFileTestCase(base.TestCase):
|
||||
self.reg_file._parse_attributes(self.json_doc)
|
||||
self.assertEqual('UNKNOWN.0.0', self.reg_file.registry)
|
||||
mock_log.assert_called_with(
|
||||
'Applying default "UNKNOWN.0.0" on required, but missing '
|
||||
'attribute "[\'Registry\']"')
|
||||
'Applying default "%s" on required, but missing '
|
||||
'attribute "%s"', 'UNKNOWN.0.0', ['Registry'])
|
||||
|
||||
|
||||
class BiosRegistryTestCase(base.TestCase):
|
||||
|
Loading…
Reference in New Issue
Block a user