From 3d78e3f0baf8f60d5179003cf22a266ca60bd02e Mon Sep 17 00:00:00 2001 From: zhanghongtao Date: Wed, 26 Jul 2017 19:44:09 +0800 Subject: [PATCH] Enable some off-by-default checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Ice7b791bf308ce9da047e2205a990b8d97924bd9 --- tox.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 80d2697..da2cbdf 100644 --- a/tox.ini +++ b/tox.ini @@ -99,8 +99,10 @@ commands = bandit -c bandit.yaml -r sahara -n5 -p sahara_default -x tests show-source = true builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools -# [H904] Delay string interpolations at logging calls. -enable-extensions=H904 +# [H904] Delay string interpolations at logging calls +# [H106] Don’t put vim configuration in source files +# [H203] Use assertIs(Not)None to check for None. +enable-extensions=H904,H106,H203 [hacking] import_exceptions = sahara.i18n