Skip to content

Commit

Permalink
Merge pull request #217 from asottile/all-repos_autofix_flake8-typing…
Browse files Browse the repository at this point in the history
…-imports

upgrade flake8-typing-imports
  • Loading branch information
asottile authored Jan 24, 2022
2 parents 0664824 + e651e6a commit d9bc48b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: ['flake8-typing-imports==1.7.0']
additional_dependencies: ['flake8-typing-imports==1.12.0']
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.6.0
hooks:
Expand Down
11 changes: 9 additions & 2 deletions reorder_python_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def _report_diff(contents: str, new_contents: str, filename: str) -> None:

# GENERATED VIA generate-typing-rewrite-info
# Using:
# flake8-typing-imports==1.10.1
# flake8-typing-imports==1.12.0
# mypy_extensions==0.4.3
# typing_extensions==3.7.4.3
# typing_extensions==4.0.1
REPLACES[(3, 7)].update((
'mypy_extensions=typing:NoReturn',
))
Expand Down Expand Up @@ -565,6 +565,7 @@ def _report_diff(contents: str, new_contents: str, filename: str) -> None:
REPLACES[(3, 8)].update((
'typing_extensions=typing:Final',
'typing_extensions=typing:Literal',
'typing_extensions=typing:OrderedDict',
'typing_extensions=typing:Protocol',
'typing_extensions=typing:SupportsIndex',
'typing_extensions=typing:TypedDict',
Expand All @@ -576,6 +577,12 @@ def _report_diff(contents: str, new_contents: str, filename: str) -> None:
REPLACES[(3, 9)].update((
'typing_extensions=typing:Annotated',
))
REPLACES[(3, 10)].update((
'typing_extensions=typing:Concatenate',
'typing_extensions=typing:ParamSpec',
'typing_extensions=typing:TypeAlias',
'typing_extensions=typing:TypeGuard',
))
# END GENERATED

# GENERATED VIA generate-typing-pep585-rewrites
Expand Down

0 comments on commit d9bc48b

Please sign in to comment.