remove 'import *' usage (or mark is #noqa)

This is talked in bug #1188533, and in current codes, there are several
places here:

horizon/forms/__init__.py:18:from django.forms import *
    mark '# noqa'

openstack_dashboard/settings.py:182:    from local.local_settings import *
openstack_dashboard/test/settings.py:5:from horizon.test.settings import *
    mark '# noqa'

openstack_dashboard/dashboards/project/instances/workflows/__init__.py:1:from create_instance import *
openstack_dashboard/dashboards/project/instances/workflows/__init__.py:2:from update_instance import *
openstack_dashboard/dashboards/project/instances/workflows/__init__.py:3:from resize_instance import *
    fix it

openstack_dashboard/dashboards/project/images_and_snapshots/urls.py:21:from django.conf.urls.defaults import *
    fix it

fixes bug # 1188533
Change-Id: Id671280903f8452a78f81f1240d92297de7a89a8
This commit is contained in:
Kun Huang 2013-07-24 16:27:01 +08:00
parent 88e048f187
commit f585152407
7 changed files with 15 additions and 9 deletions

View File

@ -9,3 +9,4 @@
<ke.wu@ibeca.me> <ke.wu@nebula.com>
Zhongyue Luo <zhongyue.nah@intel.com> <lzyeval@gmail.com>
Joe Gordon <joe.gordon0@gmail.com> <jogo@cloudscaling.com>
Kun Huang <gareth@unitedstack.com> <academicgareth@gmail.com>

View File

@ -15,7 +15,7 @@
# under the License.
# FIXME(gabriel): Legacy imports for API compatibility.
from django.forms import *
from django.forms import * # noqa
from django.forms import widgets
# Convenience imports for public API components.

View File

@ -18,7 +18,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls.defaults import *
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from openstack_dashboard.dashboards.project.images_and_snapshots.images \
import urls as image_urls

View File

@ -1,3 +1,7 @@
from create_instance import *
from update_instance import *
from resize_instance import *
from create_instance import LaunchInstance
from resize_instance import ResizeInstance
from update_instance import UpdateInstance
assert LaunchInstance
assert UpdateInstance
assert ResizeInstance

View File

@ -179,7 +179,7 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = 'Member'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'horizon.exceptions.HorizonReporterFilter'
try:
from local.local_settings import *
from local.local_settings import * # noqa
except ImportError:
logging.warning("No local_settings file found.")

View File

@ -2,7 +2,7 @@ import os
from django.utils.translation import ugettext_lazy as _
from horizon.test.settings import *
from horizon.test.settings import * # noqa
from horizon.utils.secret_key import generate_or_read_from_file
from openstack_dashboard.exceptions import NOT_FOUND

View File

@ -40,8 +40,7 @@ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,p
# F999 syntax error in doctest
# H201 no 'except:' at least use 'except Exception:'
# H302 import only modules.'from optparse import make_option' does not import a module
# H303 No wildcard (*) import.
# H4xx docstrings
# H701 empty localization string
# H702 Formatting operation should be outside of localization method call
ignore = E121,E126,E127,E128,F403,F999,H201,H302,H303,H4,H701,H702
ignore = E121,E126,E127,E128,F403,F999,H201,H302,H4,H701,H702