Deprecate N536 check

It is equivalent to H203. Prefer the built-in one.

Change-Id: Ieadefa42d40c574a5a9004974b1509df4e5f7150
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2026-01-06 21:27:15 +09:00
parent 425de7ca33
commit 682cf9d57f
3 changed files with 3 additions and 3 deletions

View File

@@ -15,5 +15,5 @@ Neutron Library Specific Commandments
- [N532] Validate that LOG.warning is used instead of LOG.warn. The latter is deprecated.
- [N534] Exception messages should be translated
- [N535] Usage of Python eventlet module not allowed
- [N536] Use assertIsNone/assertIsNotNone rather than assertEqual/assertIs to check None values.
- [N536] DEPRECATED: Use assertIsNone/assertIsNotNone rather than assertEqual/assertIs to check None values.
- [N537] Don't translate logs.

View File

@@ -14,6 +14,7 @@
import re
from debtcollector import removals
from hacking import core
from neutron_lib.hacking import translation_checks
@@ -179,6 +180,7 @@ def check_no_eventlet_imports(logical_line):
yield logical_line.index('eventlet'), msg
@removals.remove(message='Use H203 check instead')
@core.off_by_default
@core.flake8ext
def assert_equal_none(logical_line):
@@ -212,4 +214,3 @@ def factory(register):
register(translation_checks.no_translate_logs)
register(translation_checks.check_log_warn_deprecated)
register(translation_checks.check_raised_localized_exceptions)
register(assert_equal_none)

View File

@@ -108,7 +108,6 @@ extension =
N530 = neutron_lib.hacking.checks:check_neutron_namespace_imports
N532 = neutron_lib.hacking.translation_checks:check_log_warn_deprecated
N534 = neutron_lib.hacking.translation_checks:check_raised_localized_exceptions
N536 = neutron_lib.hacking.checks:assert_equal_none
N537 = neutron_lib.hacking.translation_checks:no_translate_logs
# Checks specific to neutron-lib only
N535 = neutron_lib.hacking.checks:check_no_eventlet_imports