diff --git a/README.rst b/README.rst index eb8af6ff..68e770b5 100644 --- a/README.rst +++ b/README.rst @@ -59,7 +59,6 @@ Imports - Do not import more than one module per line (*) - Do not use wildcard ``*`` import (*) - Do not make relative imports -- Do not make new nova.db imports in nova/virt/* - Order your imports by the full module path - Organize your imports according to the following template diff --git a/hacking/core.py b/hacking/core.py index db9714d6..87c6adbb 100755 --- a/hacking/core.py +++ b/hacking/core.py @@ -274,20 +274,6 @@ def hacking_import_alphabetical(logical_line, blank_lines, previous_logical, % (split_previous[1], split_line[1])) -@flake8ext -def hacking_import_no_db_in_virt(logical_line, filename): - """Check for db calls from nova/virt - - As of grizzly-2 all the database calls have been removed from - nova/virt, and we want to keep it that way. - - H307 - """ - if "nova/virt" in filename and not filename.endswith("fake.py"): - if logical_line.startswith("from nova import db"): - yield (0, "H307: nova.db import not allowed in nova/virt/*") - - def is_docstring(physical_line, previous_logical): """Return True if found docstring 'A docstring is a string literal that occurs as the first statement in a diff --git a/setup.cfg b/setup.cfg index 5725d7c4..aaf3907b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,6 @@ flake8.extension = H202 = hacking.core:hacking_except_format_assert H301 = hacking.core:hacking_import_rules H306 = hacking.core:hacking_import_alphabetical - H307 = hacking.core:hacking_import_no_db_in_virt H401 = hacking.core:hacking_docstring_start_space H402 = hacking.core:hacking_docstring_one_line H403 = hacking.core:hacking_docstring_multiline_end