Skip to content

Commit 7f5e40f

Browse files
authored
Cleanup python-reorder-imports usage (#709)
1 parent 6c2d2c8 commit 7f5e40f

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ Number of files to process concurrently during initial load.
8888

8989
**`--full-reorder`**
9090
Use additional options from [python-reorder-imports][pri] to rewrite
91-
- `--py38-plus` (default): Imports from `mypy_extensions` and `typing_extensions` when possible.
92-
- `--py39-plus`: Rewrite [PEP 585][PEP585] typing imports. Additionally `typing.Hashable` and `typing.Sized` will also be replaced by their `collections.abc` equivalents.
91+
- Imports from `mypy_extensions` and `typing_extensions` when possible.
9392

9493
**`--keep-updates`**
9594
Keep updates even if no import was removed. Use with caution, might result in more errors.

python_typing_update/main.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ async def typing_update(
4646

4747
# Add, replace and reorder imports
4848
reorder_args: list[str] = []
49-
if args.min_version < (3, 10):
50-
reorder_args += ['--add-import', 'from __future__ import annotations']
5149
if args.full_reorder:
52-
if args.min_version >= (3, 9):
53-
reorder_args += [
54-
'--replace-import', 'typing=collections.abc:Hashable',
55-
'--replace-import', 'typing=collections.abc:Sized',
56-
]
5750
reorder_args.append(version_string)
5851
reorder_args.append(filename)
5952
await loop.run_in_executor(

0 commit comments

Comments
 (0)