[PATCH 12/19] trivial: noqa imports dotted through urls

Stephen Finucane stephen at that.guru
Thu May 11 05:45:21 AEST 2017


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 at that.guru>
---
 patchwork/urls.py | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/patchwork/urls.py b/patchwork/urls.py
index c13e0ac..7f9aaaa 100644
--- a/patchwork/urls.py
+++ b/patchwork/urls.py
@@ -186,7 +186,7 @@ urlpatterns += [
 ]
 
 if 'debug_toolbar' in settings.INSTALLED_APPS:
-    import debug_toolbar
+    import debug_toolbar  # noqa
 
     urlpatterns += [
         url(r'^__debug__/', include(debug_toolbar.urls)),
@@ -209,16 +209,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'^$',
-- 
2.9.3



More information about the Patchwork mailing list