Fix and Gate on H303 (no wildcard imports)
Wildcard imports make reading code unnecessarily confusing because they make it harder to see where a functions comes from. We had two types of wildcard imports in the code. Unneeded ones in test files that are just removed, and some that we actually want which are kept using the '# noqa' comment to tell flake8 to skip specific checks (such as H303) for that line. Change-Id: Id4705011579659fd74a4aaa05ac541e9694c483e
This commit is contained in:
parent
cc72e8ffbf
commit
8ff53b4267
|
@ -20,4 +20,4 @@
|
|||
DB abstraction for Nova
|
||||
"""
|
||||
|
||||
from nova.db.api import *
|
||||
from nova.db.api import * # noqa
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from nova.ipv6.api import *
|
||||
from nova.ipv6.api import * # noqa
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -18,5 +18,3 @@
|
|||
:mod:`integrated` -- Tests whole systems, using mock services where needed
|
||||
=================================
|
||||
"""
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,4 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from nova.tests import *
|
||||
|
|
|
@ -14,6 +14,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work
|
||||
from nova.tests import *
|
||||
|
|
|
@ -12,4 +12,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from nova.tests.virt.baremetal import *
|
||||
|
|
|
@ -12,4 +12,3 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from nova.tests.virt.baremetal.db import *
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from nova.virt.baremetal.db.api import *
|
||||
from nova.virt.baremetal.db.api import * # noqa
|
||||
|
|
|
@ -22,7 +22,7 @@ where they're used.
|
|||
"""
|
||||
|
||||
|
||||
from gflags import *
|
||||
from gflags import * # noqa
|
||||
|
||||
# This keeps pylint from barfing on the imports
|
||||
FLAGS = FLAGS
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -45,7 +45,7 @@ commands = {posargs}
|
|||
# H102 Apache 2.0 license header not found
|
||||
# H501 Do not use locals() for string formatting
|
||||
|
||||
ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H302,H303,H404,F403,H501,F811,F841,N309
|
||||
ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H302,H404,F403,H501,F811,F841,N309
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*plugins/xenserver*,tools
|
||||
|
||||
[hacking]
|
||||
|
|
Loading…
Reference in New Issue