From: Alexander Bochkarev Date: Mon, 24 Feb 2014 11:10:44 +0000 (+0400) Subject: Enable flake8 H303,H304 checking X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c83511afb3fecd9be1438292893f904ca718a151;p=openstack-build%2Fcinder-build.git Enable flake8 H303,H304 checking 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: I7d194a7bbcccdba419a2a49a919e17c047633cf0 --- diff --git a/cinder/db/__init__.py b/cinder/db/__init__.py index e59bc4f3f..0fa3ac6bb 100644 --- a/cinder/db/__init__.py +++ b/cinder/db/__init__.py @@ -17,4 +17,4 @@ DB abstraction for Cinder """ -from cinder.db.api import * +from cinder.db.api import * # noqa diff --git a/cinder/tests/api/__init__.py b/cinder/tests/api/__init__.py index a2c6e2e27..e69de29bb 100644 --- a/cinder/tests/api/__init__.py +++ b/cinder/tests/api/__init__.py @@ -1,17 +0,0 @@ -# Copyright 2011 OpenStack Foundation -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# 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 cinder.tests import * diff --git a/cinder/tests/api/contrib/__init__.py b/cinder/tests/api/contrib/__init__.py index a2c6e2e27..e69de29bb 100644 --- a/cinder/tests/api/contrib/__init__.py +++ b/cinder/tests/api/contrib/__init__.py @@ -1,17 +0,0 @@ -# Copyright 2011 OpenStack Foundation -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# 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 cinder.tests import * diff --git a/cinder/tests/api/openstack/__init__.py b/cinder/tests/api/openstack/__init__.py index a2c6e2e27..e69de29bb 100644 --- a/cinder/tests/api/openstack/__init__.py +++ b/cinder/tests/api/openstack/__init__.py @@ -1,17 +0,0 @@ -# Copyright 2011 OpenStack Foundation -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# 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 cinder.tests import * diff --git a/cinder/tests/image/__init__.py b/cinder/tests/image/__init__.py index 9713c65ad..e69de29bb 100644 --- a/cinder/tests/image/__init__.py +++ b/cinder/tests/image/__init__.py @@ -1,18 +0,0 @@ -# Copyright 2011 OpenStack Foundation -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# 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 cinder.tests import * diff --git a/cinder/tests/integrated/__init__.py b/cinder/tests/integrated/__init__.py index 1870fd0a8..e69de29bb 100644 --- a/cinder/tests/integrated/__init__.py +++ b/cinder/tests/integrated/__init__.py @@ -1,20 +0,0 @@ -# Copyright (c) 2011 Justin Santa Barbara -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -""" -:mod:`integrated` -- Tests whole systems, using mock services where needed -================================= -""" -# NOTE(vish): this forces the fixtures from tests/__init.py:setup() to work -from cinder.tests import * diff --git a/cinder/tests/scheduler/__init__.py b/cinder/tests/scheduler/__init__.py index a2c6e2e27..e69de29bb 100644 --- a/cinder/tests/scheduler/__init__.py +++ b/cinder/tests/scheduler/__init__.py @@ -1,17 +0,0 @@ -# Copyright 2011 OpenStack Foundation -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# 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 cinder.tests import * diff --git a/tox.ini b/tox.ini index 523458057..3b0577fd7 100644 --- a/tox.ini +++ b/tox.ini @@ -43,6 +43,6 @@ commands = commands = {posargs} [flake8] -ignore = E711,E712,F403,H302,H303,H304,H803 +ignore = E711,E712,F403,H302,H803 builtins = _ exclude = .git,.venv,.tox,dist,tools,doc,common,*egg,build