Skip to content

Commit

Permalink
Update to isort>5
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PeterJCLaw committed Dec 19, 2020
1 parent 1ce2d86 commit df46321
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions script/linting/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ flake8-isort
flake8-mutable
flake8-todo
flake8-tuple

isort>5
5 changes: 1 addition & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ multi_line_output = 3
order_by_type = False

default_section = THIRDPARTY
known_standard_library = typing_extensions
extra_standard_library = typing_extensions
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

not_skip =
__init__.py,


[mypy]
disallow_any_explicit = True
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from sqlalchemy import create_engine
from alembic.config import Config # type: ignore[import]
from starlette.config import environ

from code_submitter.auth import NemesisUserInfo, DummyNemesisBackend

T = TypeVar('T')
Expand Down
1 change: 1 addition & 0 deletions tests/tests_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import test_utils
from starlette.testclient import TestClient

from code_submitter.tables import Archive, ChoiceHistory


Expand Down
3 changes: 2 additions & 1 deletion tests/tests_auth.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import test_utils
from starlette.requests import Request
from code_submitter.auth import NemesisBackend, NemesisUserInfo
from starlette.responses import Response, JSONResponse
from starlette.applications import Starlette
from starlette.authentication import AuthenticationError

from code_submitter.auth import NemesisBackend, NemesisUserInfo


class NemesisAuthTests(test_utils.AsyncTestCase):
def setUp(self) -> None:
Expand Down
1 change: 1 addition & 0 deletions tests/tests_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import datetime

import test_utils

from code_submitter import utils
from code_submitter.tables import Archive, ChoiceHistory

Expand Down

0 comments on commit df46321

Please sign in to comment.