[v2,3/9] trivial: noqa imports dotted through urls

Message ID 20171102102844.18931-4-stephen@that.guru
State New
Headers show
Series
  • Add support for Django 1.11
Related show

Commit Message

Stephen Finucane Nov. 2, 2017, 10:28 a.m.
There are two imports not located in the top of the file due to how we
use them. 'noqa' these to prevent issues with static code analysers.

Signed-off-by: Stephen Finucane <stephen@that.guru>
---
 patchwork/urls.py | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

Patch

diff --git a/patchwork/urls.py b/patchwork/urls.py
index b33b01c4..6d49d648 100644
--- a/patchwork/urls.py
+++ b/patchwork/urls.py
@@ -188,7 +188,7 @@  urlpatterns += [
 ]
 
 if 'debug_toolbar' in settings.INSTALLED_APPS:
-    import debug_toolbar
+    import debug_toolbar  # noqa
 
     urlpatterns += [
         url(r'^__debug__/', include(debug_toolbar.urls)),
@@ -211,16 +211,16 @@  if settings.ENABLE_REST_API:
         raise RuntimeError(
             'djangorestframework must be installed to enable the REST API.')
 
-    from patchwork.api import bundle as api_bundle_views
-    from patchwork.api import check as api_check_views
-    from patchwork.api import cover as api_cover_views
-    from patchwork.api import event as api_event_views
-    from patchwork.api import index as api_index_views
-    from patchwork.api import patch as api_patch_views
-    from patchwork.api import person as api_person_views
-    from patchwork.api import project as api_project_views
-    from patchwork.api import series as api_series_views
-    from patchwork.api import user as api_user_views
+    from patchwork.api import bundle as api_bundle_views  # noqa
+    from patchwork.api import check as api_check_views  # noqa
+    from patchwork.api import cover as api_cover_views  # noqa
+    from patchwork.api import event as api_event_views  # noqa
+    from patchwork.api import index as api_index_views  # noqa
+    from patchwork.api import patch as api_patch_views  # noqa
+    from patchwork.api import person as api_person_views  # noqa
+    from patchwork.api import project as api_project_views  # noqa
+    from patchwork.api import series as api_series_views  # noqa
+    from patchwork.api import user as api_user_views  # noqa
 
     api_patterns = [
         url(r'^$',