Skip to content

Commit

Permalink
Support isort 6 (#2289)
Browse files Browse the repository at this point in the history
The breaking changes in isort 6 are just to remove support for Python
3.8 (see https://github.com/PyCQA/isort/releases), so there's no need
for this project to treat it differently from isort 5.

Co-authored-by: Koudai Aono <[email protected]>
  • Loading branch information
cjwatson and koxudaxi authored Feb 6, 2025
1 parent dd32694 commit 94c21e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies = [
"graphql-core>=3.2.3",
"httpx>=0.24.1",
"inflect>=4.1,<6",
"isort>=4.3.21,<6",
"isort>=4.3.21,<7",
"jinja2>=2.10.1,<4",
"openapi-spec-validator>=0.2.8,<0.7",
"packaging",
Expand Down
4 changes: 2 additions & 2 deletions tests/main/graphql/test_main_graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ def test_main_graphql_additional_imports_isort_4():


@pytest.mark.skipif(
not isort.__version__.startswith('5.'),
isort.__version__.startswith('4.'),
reason='See https://github.com/PyCQA/isort/issues/1600 for example',
)
@freeze_time('2019-07-26')
@pytest.mark.skipif(
black.__version__.split('.')[0] == '19',
reason="Installed black doesn't support the old style",
)
def test_main_graphql_additional_imports_isort_5():
def test_main_graphql_additional_imports_isort_5_or_6():
with TemporaryDirectory() as output_dir:
output_file: Path = Path(output_dir) / 'output.py'
return_code: Exit = main(
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 94c21e6

Please sign in to comment.