reorder-python-imports 3.13.0__tar.gz → 3.15.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/PKG-INFO +13 -4
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/README.md +10 -1
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/reorder_python_imports.egg-info/PKG-INFO +14 -5
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/reorder_python_imports.py +26 -7
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/setup.cfg +2 -3
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/LICENSE +0 -0
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/reorder_python_imports.egg-info/SOURCES.txt +0 -0
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/reorder_python_imports.egg-info/dependency_links.txt +0 -0
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/reorder_python_imports.egg-info/entry_points.txt +0 -0
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/reorder_python_imports.egg-info/requires.txt +0 -0
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/reorder_python_imports.egg-info/top_level.txt +0 -0
- {reorder_python_imports-3.13.0 → reorder_python_imports-3.15.0}/setup.py +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: reorder_python_imports
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.15.0
|
|
4
4
|
Summary: Tool for reordering python imports
|
|
5
5
|
Home-page: https://github.com/asottile/reorder-python-imports
|
|
6
6
|
Author: Anthony Sottile
|
|
7
7
|
Author-email: asottile@umich.edu
|
|
8
8
|
License: MIT
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
9
|
Classifier: Programming Language :: Python :: 3
|
|
11
10
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
11
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
13
12
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
14
|
-
Requires-Python: >=3.
|
|
13
|
+
Requires-Python: >=3.9
|
|
15
14
|
Description-Content-Type: text/markdown
|
|
16
15
|
License-File: LICENSE
|
|
16
|
+
Requires-Dist: classify-imports>=4.1
|
|
17
17
|
|
|
18
18
|
[](https://github.com/asottile/reorder-python-imports/actions/workflows/main.yml)
|
|
19
19
|
[](https://results.pre-commit.ci/latest/github/asottile/reorder-python-imports/main)
|
|
@@ -61,7 +61,7 @@ Sample `.pre-commit-config.yaml`
|
|
|
61
61
|
|
|
62
62
|
```yaml
|
|
63
63
|
- repo: https://github.com/asottile/reorder-python-imports
|
|
64
|
-
rev: v3.
|
|
64
|
+
rev: v3.15.0
|
|
65
65
|
hooks:
|
|
66
66
|
- id: reorder-python-imports
|
|
67
67
|
```
|
|
@@ -146,6 +146,15 @@ except ImportError:
|
|
|
146
146
|
pass
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
+
```python
|
|
150
|
+
from typing import TYPE_CHECKING
|
|
151
|
+
|
|
152
|
+
if TYPE_CHECKING:
|
|
153
|
+
# all these imports are after non-whitspace non-comment lines
|
|
154
|
+
# and will be ignored (i.e. they will remain out of order)
|
|
155
|
+
from collections.abc import Sequence
|
|
156
|
+
from collections.abc import Callable
|
|
157
|
+
```
|
|
149
158
|
|
|
150
159
|
```python
|
|
151
160
|
import sys
|
|
@@ -44,7 +44,7 @@ Sample `.pre-commit-config.yaml`
|
|
|
44
44
|
|
|
45
45
|
```yaml
|
|
46
46
|
- repo: https://github.com/asottile/reorder-python-imports
|
|
47
|
-
rev: v3.
|
|
47
|
+
rev: v3.15.0
|
|
48
48
|
hooks:
|
|
49
49
|
- id: reorder-python-imports
|
|
50
50
|
```
|
|
@@ -129,6 +129,15 @@ except ImportError:
|
|
|
129
129
|
pass
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
+
```python
|
|
133
|
+
from typing import TYPE_CHECKING
|
|
134
|
+
|
|
135
|
+
if TYPE_CHECKING:
|
|
136
|
+
# all these imports are after non-whitspace non-comment lines
|
|
137
|
+
# and will be ignored (i.e. they will remain out of order)
|
|
138
|
+
from collections.abc import Sequence
|
|
139
|
+
from collections.abc import Callable
|
|
140
|
+
```
|
|
132
141
|
|
|
133
142
|
```python
|
|
134
143
|
import sys
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 3.
|
|
2
|
+
Name: reorder_python_imports
|
|
3
|
+
Version: 3.15.0
|
|
4
4
|
Summary: Tool for reordering python imports
|
|
5
5
|
Home-page: https://github.com/asottile/reorder-python-imports
|
|
6
6
|
Author: Anthony Sottile
|
|
7
7
|
Author-email: asottile@umich.edu
|
|
8
8
|
License: MIT
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
9
|
Classifier: Programming Language :: Python :: 3
|
|
11
10
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
11
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
13
12
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
14
|
-
Requires-Python: >=3.
|
|
13
|
+
Requires-Python: >=3.9
|
|
15
14
|
Description-Content-Type: text/markdown
|
|
16
15
|
License-File: LICENSE
|
|
16
|
+
Requires-Dist: classify-imports>=4.1
|
|
17
17
|
|
|
18
18
|
[](https://github.com/asottile/reorder-python-imports/actions/workflows/main.yml)
|
|
19
19
|
[](https://results.pre-commit.ci/latest/github/asottile/reorder-python-imports/main)
|
|
@@ -61,7 +61,7 @@ Sample `.pre-commit-config.yaml`
|
|
|
61
61
|
|
|
62
62
|
```yaml
|
|
63
63
|
- repo: https://github.com/asottile/reorder-python-imports
|
|
64
|
-
rev: v3.
|
|
64
|
+
rev: v3.15.0
|
|
65
65
|
hooks:
|
|
66
66
|
- id: reorder-python-imports
|
|
67
67
|
```
|
|
@@ -146,6 +146,15 @@ except ImportError:
|
|
|
146
146
|
pass
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
+
```python
|
|
150
|
+
from typing import TYPE_CHECKING
|
|
151
|
+
|
|
152
|
+
if TYPE_CHECKING:
|
|
153
|
+
# all these imports are after non-whitspace non-comment lines
|
|
154
|
+
# and will be ignored (i.e. they will remain out of order)
|
|
155
|
+
from collections.abc import Sequence
|
|
156
|
+
from collections.abc import Callable
|
|
157
|
+
```
|
|
149
158
|
|
|
150
159
|
```python
|
|
151
160
|
import sys
|
|
@@ -9,9 +9,9 @@ import itertools
|
|
|
9
9
|
import os
|
|
10
10
|
import re
|
|
11
11
|
import sys
|
|
12
|
-
from
|
|
12
|
+
from collections.abc import Generator
|
|
13
|
+
from collections.abc import Sequence
|
|
13
14
|
from typing import NamedTuple
|
|
14
|
-
from typing import Sequence
|
|
15
15
|
|
|
16
16
|
from classify_imports import Import
|
|
17
17
|
from classify_imports import import_obj_from_str
|
|
@@ -58,7 +58,7 @@ TOKENIZE: tuple[tuple[Tok, re.Pattern[str]], ...] = (
|
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
def _tokenize(s: str) -> Generator[tuple[Tok, str]
|
|
61
|
+
def _tokenize(s: str) -> Generator[tuple[Tok, str]]:
|
|
62
62
|
pos = 0
|
|
63
63
|
while True:
|
|
64
64
|
for tp, reg in TOKENIZE:
|
|
@@ -268,7 +268,7 @@ def replace_imports(
|
|
|
268
268
|
return ret
|
|
269
269
|
|
|
270
270
|
|
|
271
|
-
def _module_to_base_modules(s: str) -> Generator[str
|
|
271
|
+
def _module_to_base_modules(s: str) -> Generator[str]:
|
|
272
272
|
"""return all module names that would be imported due to this
|
|
273
273
|
import-import
|
|
274
274
|
"""
|
|
@@ -415,13 +415,14 @@ REMOVALS[(3,)].update((
|
|
|
415
415
|
'from __future__ import unicode_literals',
|
|
416
416
|
))
|
|
417
417
|
REMOVALS[(3, 7)].add('from __future__ import generator_stop')
|
|
418
|
+
REMOVALS[(3, 14)].add('from __future__ import annotations')
|
|
418
419
|
# END GENERATED
|
|
419
420
|
|
|
420
421
|
# GENERATED VIA generate-typing-rewrite-info
|
|
421
422
|
# Using:
|
|
422
|
-
# flake8-typing-imports==1.
|
|
423
|
-
# mypy-extensions==1.
|
|
424
|
-
# typing-extensions==4.
|
|
423
|
+
# flake8-typing-imports==1.16.0
|
|
424
|
+
# mypy-extensions==1.1.0
|
|
425
|
+
# typing-extensions==4.13.2
|
|
425
426
|
REPLACES[(3, 6)].update((
|
|
426
427
|
'typing_extensions=typing:AbstractSet',
|
|
427
428
|
'typing_extensions=typing:AnyStr',
|
|
@@ -526,6 +527,24 @@ REPLACES[(3, 12)].update((
|
|
|
526
527
|
'typing_extensions=typing:dataclass_transform',
|
|
527
528
|
'typing_extensions=typing:override',
|
|
528
529
|
))
|
|
530
|
+
REPLACES[(3, 13)].update((
|
|
531
|
+
'typing_extensions=typing:AsyncContextManager',
|
|
532
|
+
'typing_extensions=typing:AsyncGenerator',
|
|
533
|
+
'typing_extensions=typing:ContextManager',
|
|
534
|
+
'typing_extensions=typing:Generator',
|
|
535
|
+
'typing_extensions=typing:NoDefault',
|
|
536
|
+
'typing_extensions=typing:ParamSpec',
|
|
537
|
+
'typing_extensions=typing:Protocol',
|
|
538
|
+
'typing_extensions=typing:ReadOnly',
|
|
539
|
+
'typing_extensions=typing:TypeIs',
|
|
540
|
+
'typing_extensions=typing:TypeVar',
|
|
541
|
+
'typing_extensions=typing:TypeVarTuple',
|
|
542
|
+
'typing_extensions=typing:TypedDict',
|
|
543
|
+
'typing_extensions=typing:get_protocol_members',
|
|
544
|
+
'typing_extensions=typing:is_protocol',
|
|
545
|
+
'typing_extensions=typing:runtime_checkable',
|
|
546
|
+
'typing_extensions=warnings:deprecated',
|
|
547
|
+
))
|
|
529
548
|
# END GENERATED
|
|
530
549
|
|
|
531
550
|
# GENERATED VIA generate-typing-pep585-rewrites
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = reorder_python_imports
|
|
3
|
-
version = 3.
|
|
3
|
+
version = 3.15.0
|
|
4
4
|
description = Tool for reordering python imports
|
|
5
5
|
long_description = file: README.md
|
|
6
6
|
long_description_content_type = text/markdown
|
|
@@ -10,7 +10,6 @@ author_email = asottile@umich.edu
|
|
|
10
10
|
license = MIT
|
|
11
11
|
license_files = LICENSE
|
|
12
12
|
classifiers =
|
|
13
|
-
License :: OSI Approved :: MIT License
|
|
14
13
|
Programming Language :: Python :: 3
|
|
15
14
|
Programming Language :: Python :: 3 :: Only
|
|
16
15
|
Programming Language :: Python :: Implementation :: CPython
|
|
@@ -20,7 +19,7 @@ classifiers =
|
|
|
20
19
|
py_modules = reorder_python_imports
|
|
21
20
|
install_requires =
|
|
22
21
|
classify-imports>=4.1
|
|
23
|
-
python_requires = >=3.
|
|
22
|
+
python_requires = >=3.9
|
|
24
23
|
|
|
25
24
|
[options.entry_points]
|
|
26
25
|
console_scripts =
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|