Remove new checks from hacking factory()

In prep for neutron-lib 0.4.0 we found there are 2 new hacking
checks in neutron-lib that will impact consumers who use our
neutron_lib.hacking.checks.factory() function to register hacking
checks. For example, networking-ovn master pep8 with neutron-lib
master fails. For more discussion please see [1]

This patch removes (reverts) these 2 new hacking checks from being
registered via our factory(). The check functions are still in the module
but don't get registered via factory() and thus don't break consumers.

This patch should be reverted after 0.4.0 releases.

Looking forward we'll solidify our hacking check approach with
something like [2].

[1] https://review.openstack.org/#/c/360590/
[2] https://review.openstack.org/#/c/350723/

Change-Id: Id55a64279a7904ca7f7e35fcbd36a8f6926482cd
This commit is contained in:
Boden R 2016-08-25 09:32:14 -06:00 committed by Doug Wiegley
parent e9cfd05bda
commit 705fd9090c

View File

@ -231,9 +231,11 @@ def factory(register):
register(check_python3_no_iteritems) register(check_python3_no_iteritems)
register(no_mutable_default_args) register(no_mutable_default_args)
register(check_neutron_namespace_imports) register(check_neutron_namespace_imports)
register(check_no_eventlet_imports) # TODO(boden) - uncomment this after 0.4.0 ships
# register(check_no_eventlet_imports)
register(translation_checks.validate_log_translations) register(translation_checks.validate_log_translations)
register(translation_checks.no_translate_debug_logs) register(translation_checks.no_translate_debug_logs)
register(translation_checks.check_log_warn_deprecated) register(translation_checks.check_log_warn_deprecated)
register(translation_checks.check_raised_localized_exceptions) register(translation_checks.check_raised_localized_exceptions)
register(translation_checks.check_delayed_string_interpolation) # TODO(boden) - uncomment this after 0.4.0 ships
# register(translation_checks.check_delayed_string_interpolation)