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:
parent
88e048f187
commit
f585152407
1
.mailmap
1
.mailmap
@ -9,3 +9,4 @@
|
|||||||
<ke.wu@ibeca.me> <ke.wu@nebula.com>
|
<ke.wu@ibeca.me> <ke.wu@nebula.com>
|
||||||
Zhongyue Luo <zhongyue.nah@intel.com> <lzyeval@gmail.com>
|
Zhongyue Luo <zhongyue.nah@intel.com> <lzyeval@gmail.com>
|
||||||
Joe Gordon <joe.gordon0@gmail.com> <jogo@cloudscaling.com>
|
Joe Gordon <joe.gordon0@gmail.com> <jogo@cloudscaling.com>
|
||||||
|
Kun Huang <gareth@unitedstack.com> <academicgareth@gmail.com>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
# FIXME(gabriel): Legacy imports for API compatibility.
|
# FIXME(gabriel): Legacy imports for API compatibility.
|
||||||
from django.forms import *
|
from django.forms import * # noqa
|
||||||
from django.forms import widgets
|
from django.forms import widgets
|
||||||
|
|
||||||
# Convenience imports for public API components.
|
# Convenience imports for public API components.
|
||||||
|
@ -18,7 +18,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# 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 \
|
from openstack_dashboard.dashboards.project.images_and_snapshots.images \
|
||||||
import urls as image_urls
|
import urls as image_urls
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
from create_instance import *
|
from create_instance import LaunchInstance
|
||||||
from update_instance import *
|
from resize_instance import ResizeInstance
|
||||||
from resize_instance import *
|
from update_instance import UpdateInstance
|
||||||
|
|
||||||
|
assert LaunchInstance
|
||||||
|
assert UpdateInstance
|
||||||
|
assert ResizeInstance
|
||||||
|
@ -179,7 +179,7 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = 'Member'
|
|||||||
DEFAULT_EXCEPTION_REPORTER_FILTER = 'horizon.exceptions.HorizonReporterFilter'
|
DEFAULT_EXCEPTION_REPORTER_FILTER = 'horizon.exceptions.HorizonReporterFilter'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from local.local_settings import *
|
from local.local_settings import * # noqa
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logging.warning("No local_settings file found.")
|
logging.warning("No local_settings file found.")
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import os
|
|||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
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 horizon.utils.secret_key import generate_or_read_from_file
|
||||||
|
|
||||||
from openstack_dashboard.exceptions import NOT_FOUND
|
from openstack_dashboard.exceptions import NOT_FOUND
|
||||||
|
3
tox.ini
3
tox.ini
@ -40,8 +40,7 @@ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,p
|
|||||||
# F999 syntax error in doctest
|
# F999 syntax error in doctest
|
||||||
# H201 no 'except:' at least use 'except Exception:'
|
# H201 no 'except:' at least use 'except Exception:'
|
||||||
# H302 import only modules.'from optparse import make_option' does not import a module
|
# H302 import only modules.'from optparse import make_option' does not import a module
|
||||||
# H303 No wildcard (*) import.
|
|
||||||
# H4xx docstrings
|
# H4xx docstrings
|
||||||
# H701 empty localization string
|
# H701 empty localization string
|
||||||
# H702 Formatting operation should be outside of localization method call
|
# 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user