Skip to content

Commit df46321

Browse files
committed
Update to isort>5
This has some different config settings and slightly different detection of first-party modules, so we need to pin it. This commit also contains the relevant code fixes to keep isort happy.
1 parent 1ce2d86 commit df46321

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

script/linting/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ flake8-isort
88
flake8-mutable
99
flake8-todo
1010
flake8-tuple
11+
12+
isort>5

setup.cfg

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,9 @@ multi_line_output = 3
2929
order_by_type = False
3030

3131
default_section = THIRDPARTY
32-
known_standard_library = typing_extensions
32+
extra_standard_library = typing_extensions
3333
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
3434

35-
not_skip =
36-
__init__.py,
37-
3835

3936
[mypy]
4037
disallow_any_explicit = True

tests/test_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from sqlalchemy import create_engine
1010
from alembic.config import Config # type: ignore[import]
1111
from starlette.config import environ
12+
1213
from code_submitter.auth import NemesisUserInfo, DummyNemesisBackend
1314

1415
T = TypeVar('T')

tests/tests_app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import test_utils
77
from starlette.testclient import TestClient
8+
89
from code_submitter.tables import Archive, ChoiceHistory
910

1011

tests/tests_auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import test_utils
22
from starlette.requests import Request
3-
from code_submitter.auth import NemesisBackend, NemesisUserInfo
43
from starlette.responses import Response, JSONResponse
54
from starlette.applications import Starlette
65
from starlette.authentication import AuthenticationError
76

7+
from code_submitter.auth import NemesisBackend, NemesisUserInfo
8+
89

910
class NemesisAuthTests(test_utils.AsyncTestCase):
1011
def setUp(self) -> None:

tests/tests_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import datetime
44

55
import test_utils
6+
67
from code_submitter import utils
78
from code_submitter.tables import Archive, ChoiceHistory
89

0 commit comments

Comments
 (0)