flake8: Enable some off-by-default checks
Enable the following off-by-default checks: * [H204] Use assert(Not)Equal to check for equality. * [H205] Use assert(Greater|Less)(Equal) for comparison. * [H210] Require ‘autospec’, ‘spec’, or ‘spec_set’ in mock.patch/mock.patch.object calls Increase the version of hacking in test-requirements so that can use new off-by-default checks. No changes to code were required. Change-Id: I98aa484dc5414ee49c281dfd40e44b3c613d53e0
This commit is contained in:
parent
9ed2677c9d
commit
b67f9c1298
@ -1,7 +1,7 @@
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
hacking<0.13,>=0.12.0 # Apache-2.0
|
||||
hacking>=1.0.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
mock>=2.0.0 # BSD
|
||||
testtools>=1.4.0 # MIT
|
||||
|
5
tox.ini
5
tox.ini
@ -69,8 +69,11 @@ import-order-style = pep8
|
||||
application-import-names = ironic_python_agent
|
||||
# [H106] Don't put vim configuration in source files.
|
||||
# [H203] Use assertIs(Not)None to check for None.
|
||||
# [H204] Use assert(Not)Equal to check for equality.
|
||||
# [H205] Use assert(Greater|Less)(Equal) for comparison.
|
||||
# [H210] Require ‘autospec’, ‘spec’, or ‘spec_set’ in mock.patch/mock.patch.object calls
|
||||
# [H904] Delay string interpolations at logging calls.
|
||||
enable-extensions=H106,H203,H904
|
||||
enable-extensions=H106,H203,H204,H205,H210,H904
|
||||
|
||||
[hacking]
|
||||
import_exceptions = ironic.openstack.common.gettextutils._,testtools.matchers
|
||||
|
Loading…
Reference in New Issue
Block a user