From 7dbb7c1721a6a45ad78cd0e7250b134a2e9aa366 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Thu, 12 Oct 2017 15:02:32 -0700 Subject: [PATCH] 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. 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: I7fe394d99eee980e90768902b9fc264a8be3fe15 --- test-requirements.txt | 2 +- tox.ini | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index fc5379de6..3c8fca119 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,7 @@ coverage!=4.4,>=4.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 flake8-import-order==0.11 # LGPLv3 -hacking<0.13,>=0.12.0 # Apache-2.0 +hacking>=1.0.0 # Apache-2.0 mock>=2.0.0 # BSD sphinx>=1.6.2 # BSD openstackdocstheme>=1.17.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index cf75a0a13..780e11fd4 100644 --- a/tox.ini +++ b/tox.ini @@ -61,8 +61,10 @@ commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/s max-complexity=15 # [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. # [H904] Delay string interpolations at logging calls. -enable-extensions=H106,H203,H904 +enable-extensions=H106,H203,H204,H205,H904 import-order-style = pep8 application-import-names = ironic_inspector