Skip to content

Commit

Permalink
ensure import __future__ sorts as standard library
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jan 25, 2022
1 parent 9f01d63 commit 8c891f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers =
[options]
py_modules = reorder_python_imports
install_requires =
aspy.refactor-imports>=2.1.0
aspy.refactor-imports>=2.2.1
python_requires = >=3.7

[options.entry_points]
Expand Down
9 changes: 9 additions & 0 deletions tests/reorder_python_imports_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,15 @@ def test_replace_module_imported_asname():

id='noreorder not at beginning',
),
pytest.param(
'from __future__ import annotations\n'
'\n'
'import __future__\n',
'from __future__ import annotations\n'
'\n'
'import __future__\n',
id='__future__ from and import',
),
),
)

Expand Down

0 comments on commit 8c891f0

Please sign in to comment.