Skip to content

Commit 8c891f0

Browse files
committed
ensure import __future__ sorts as standard library
1 parent 9f01d63 commit 8c891f0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers =
2323
[options]
2424
py_modules = reorder_python_imports
2525
install_requires =
26-
aspy.refactor-imports>=2.1.0
26+
aspy.refactor-imports>=2.2.1
2727
python_requires = >=3.7
2828

2929
[options.entry_points]

tests/reorder_python_imports_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,15 @@ def test_replace_module_imported_asname():
698698

699699
id='noreorder not at beginning',
700700
),
701+
pytest.param(
702+
'from __future__ import annotations\n'
703+
'\n'
704+
'import __future__\n',
705+
'from __future__ import annotations\n'
706+
'\n'
707+
'import __future__\n',
708+
id='__future__ from and import',
709+
),
701710
),
702711
)
703712

0 commit comments

Comments
 (0)