]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
trivial: noqa imports dotted through urls
authorStephen Finucane <stephen@that.guru>
Fri, 19 May 2017 14:52:26 +0000 (15:52 +0100)
committerStephen Finucane <stephen@that.guru>
Sun, 3 Dec 2017 20:54:27 +0000 (20:54 +0000)
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>
Tested-by: Daniel Axtens <dja@axtens.net>
patchwork/urls.py

index 4fab12f8d63c3e73526dde456ccd7c7768b9b341..719347220a867de4da513f2cd29a981be23c4155 100644 (file)
@@ -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'^$',