Remove #noqa from django.conf.urls.include

We have one more import with #noqa: django.conf.urls.include that is also
commonly used in urls.py module and could be included to the list of
import exceptions. This change has also revealed one unused import.

Change-Id: I47cc582340625aac87ab0242b147e11ef1d9b38e
This commit is contained in:
Tatiana Ovchinnikova 2014-09-25 16:13:02 +04:00
parent cdad4940e7
commit b47f226647
15 changed files with 16 additions and 37 deletions

View File

@ -3,30 +3,9 @@ Horizon Style Commandments
- Step 1: Read the OpenStack Style Commandments
http://docs.openstack.org/developer/hacking/
- Step 2: The following names can be imported directly, without triggering the
"H302: import only modules" flake8 warning::
collections.defaultdict,
django.conf.settings,
django.conf.urls.patterns,
django.conf.urls.url,
django.core.urlresolvers.reverse,
django.core.urlresolvers.reverse_lazy,
django.template.loader.render_to_string,
django.test.utils.override_settings,
django.utils.datastructures.SortedDict,
django.utils.encoding.force_text,
django.utils.html.conditional_escape,
django.utils.html.escape,
django.utils.http.urlencode,
django.utils.safestring.mark_safe,
django.utils.translation.npgettext_lazy,
django.utils.translation.pgettext_lazy,
django.utils.translation.ugettext_lazy,
django.utils.translation.ungettext_lazy,
operator.attrgetter,
StringIO.StringIO
- Step 2: Read [hacking] section in tox.ini to find the list of names which
can be imported directly without triggering the "H302: import only modules"
flake8 warning
- Step 3: Read on
Horizon Specific Commandments

View File

@ -27,7 +27,7 @@ import logging
import os
from django.conf import settings
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.core.exceptions import ImproperlyConfigured # noqa

View File

@ -17,7 +17,7 @@
# under the License.
from django.conf import settings
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.views.generic import TemplateView # noqa

View File

@ -20,7 +20,7 @@
URL patterns for testing Horizon views.
"""
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -10,7 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url

View File

@ -21,7 +21,7 @@ URL patterns for the OpenStack Dashboard.
"""
from django.conf import settings
from django.conf.urls import include # noqa
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls.static import static # noqa
from django.conf.urls import url

View File

@ -71,6 +71,7 @@ ignore = E127,E128,H307,H405,H803,H904
[hacking]
import_exceptions = collections.defaultdict,
django.conf.settings,
django.conf.urls.include,
django.conf.urls.patterns,
django.conf.urls.url,
django.core.urlresolvers.reverse,