Browse Source

ref: fix linting of fixtures namespace (#35684)

* ref: fix linting of fixtures namespace

* style(lint): Auto commit lint changes

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
anthony sottile 2 years ago
parent
commit
8894343aa5

+ 2 - 3
.pre-commit-config.yaml

@@ -4,8 +4,6 @@ exclude: >
         \.snap$|
         \.map$|
         \.map\.js$|
-        ^tests/sentry/lang/.*/fixtures/|
-        ^fixtures/|
         ^src/sentry/static/sentry/vendor/|
         ^tests/sentry/lang/javascript/example-project/|
         ^src/.*/locale/|
@@ -80,9 +78,10 @@ repos:
     - id: check-symlinks
     - id: end-of-file-fixer
       exclude_types: [svg]
+      exclude: ^fixtures/
     - id: trailing-whitespace
       exclude_types: [svg]
-      exclude: ^scripts/patches/
+      exclude: ^(fixtures/|scripts/patches/)
     - id: debug-statements
     - id: name-tests-test
       args: [--pytest-test-first]

+ 1 - 1
fixtures/integrations/jira/stub_client.py

@@ -1,5 +1,5 @@
-from sentry.shared_integrations.exceptions import ApiError
 from fixtures.integrations import StubService
+from sentry.shared_integrations.exceptions import ApiError
 
 
 class StubJiraApiClient(StubService):

+ 2 - 2
fixtures/integrations/mock_service.py

@@ -1,11 +1,11 @@
-import json
 import os
 import shutil
 from collections import defaultdict
 
-from sentry.utils.numbers import base32_encode
 from fixtures.integrations import FIXTURE_DIRECTORY
 from fixtures.integrations.stub_service import StubService
+from sentry.utils import json
+from sentry.utils.numbers import base32_encode
 
 
 class MockService(StubService):

+ 1 - 1
fixtures/integrations/stub_service.py

@@ -1,8 +1,8 @@
 import os
 from copy import deepcopy
 
-from sentry.utils import json
 from fixtures.integrations import FIXTURE_DIRECTORY
+from sentry.utils import json
 
 
 class StubService:

+ 1 - 2
fixtures/sudo_testutils.py

@@ -1,6 +1,5 @@
-from django.contrib.auth.models import AbstractBaseUser
+from django.contrib.auth.models import AbstractBaseUser, AnonymousUser, User
 from django.db import models
-from django.contrib.auth.models import AnonymousUser, User
 from django.test import RequestFactory, TestCase