From aa9e237913d8a67cdb423b0e5f4731d40511302b Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 15 Feb 2026 00:41:11 +0900 Subject: [PATCH] Use more specific assertion methods Enable a few optional checks from hacking to enforce this. Change-Id: I2509c908572bbaf3044c175dab0e0462ed19f104 Signed-off-by: Takashi Kajinami --- tox.ini | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 49811886..6ced3da8 100644 --- a/tox.ini +++ b/tox.ini @@ -55,7 +55,10 @@ commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenote [flake8] builtins = _ exclude = .venv,.git,.tox,dist,doc,*.egg -# [H904] Delay string interpolations at logging calls. -enable-extensions=H904 +# H203: Use assertIs(Not)None to check for None +# H204: Use assert(Not)Equal() +# H205: Use assert{Greater,Less}[Equal] +# H904: Delay string interpolations at logging calls +enable-extensions = H203,H204,H205,H904 # W504 line break after binary operator ignore = W504