Enable some off-by-default checks
Some of the available checks are disabled by default, like: [H106] Don’t put vim configuration in source files [H203] Use assertIs(Not)None to check for None Change-Id: I33f4264ddf79067f75cd5ba87ea08286dd957dc2
This commit is contained in:
parent
6d6b8e5b61
commit
10814703f2
@ -428,8 +428,7 @@ class WorkbookSpecValidation(base.WorkbookSpecValidationTestCase):
|
||||
|
||||
for valid in valid_names:
|
||||
result = re.match(workbook.NON_VERSION_WORD_REGEX, valid)
|
||||
self.assertNotEqual(
|
||||
None,
|
||||
self.assertIsNotNone(
|
||||
result,
|
||||
"Expected match for: {}".format(valid)
|
||||
)
|
||||
@ -440,8 +439,7 @@ class WorkbookSpecValidation(base.WorkbookSpecValidationTestCase):
|
||||
|
||||
for invalid in invalid_names:
|
||||
result = re.match(workbook.NON_VERSION_WORD_REGEX, invalid)
|
||||
self.assertEqual(
|
||||
None,
|
||||
self.assertIsNone(
|
||||
result,
|
||||
"Didn't expected match for: {}".format(invalid)
|
||||
)
|
||||
|
@ -65,9 +65,8 @@ class KombuListenerTestCase(base.KombuTestCase):
|
||||
|
||||
self.listener.remove_listener(correlation_id)
|
||||
|
||||
self.assertEqual(
|
||||
self.listener._results.get(correlation_id),
|
||||
None
|
||||
self.assertIsNone(
|
||||
self.listener._results.get(correlation_id)
|
||||
)
|
||||
|
||||
def test_remove_listener_correlation_id_not_in_results(self):
|
||||
|
3
tox.ini
3
tox.ini
@ -75,6 +75,9 @@ whitelist_externals = rm
|
||||
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401
|
||||
show-source = true
|
||||
builtins = _
|
||||
# [H106] Don't put vim configuration in source files.
|
||||
# [H203] Use assertIs(Not)None to check for None.
|
||||
enable-extensions = H106,H203
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,scripts
|
||||
|
||||
[hacking]
|
||||
|
Loading…
x
Reference in New Issue
Block a user