neutron/neutron/tests/unit/hacking
Akihiro Motoki 52e3fee5ef Switch to hacking 3.0.1
In hacking 2.0 or later, local-check-factory was removed as it is not
compatible with flake8 3.x and it is advised to use flake8's local
plugins [1]. neutron-lib provided a factory to register common hacking
rules, but it no longer works with hacking 2, so we need to define rules
defined in neutron-lib as flake8 local check plugin [2] explicitly.
This needs to be done in each neutron related project, so it is the
downside of the migration to hacking 2.x (I explored a way to continue
to use the factory but failed to find a good way to achieve this) but
I believe it is good to migrate the newer libraries.

* flake8ext decorator in neutron/hacking/checks.py is also replaced with
  hacking.core.flake8ext to avoid the copy-and-paste code.
* neutron-lib dependency is updated as neutron-lib 2.3 added hacking 3 support.
* Python modules related to coding style checks (listed in blacklist.txt in
  openstack/requirements repo) are dropped from lower-constraints.txt
  as they are not actually used in tests (other than pep8).
* HackingDocTestCase is now converted into normal test cases.
  HackingDocTestCase depends on the internal of hacking and pycodestyle
  so it looks better to use normal style of writing tests.

[1] https://docs.openstack.org/releasenotes/hacking/unreleased.html#relnotes-2-0-0
[2] https://flake8.pycqa.org/en/3.7.0/user/configuration.html#using-local-plugins

Change-Id: I92cf50a84bb587a0649a7cffee15cce4ce37d086
2020-05-12 16:58:41 -04:00
..
__init__.py Moved hacking unit test into proper location 2015-02-11 14:06:37 +01:00
test_checks.py Switch to hacking 3.0.1 2020-05-12 16:58:41 -04:00