Bump mypy to 1.7.1 (#4069)
This commit is contained in:
parent
fb5e5d2be6
commit
69d49c5a6f
@ -39,7 +39,7 @@ repos:
|
||||
exclude: ^src/blib2to3/
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.6.1
|
||||
rev: v1.7.1
|
||||
hooks:
|
||||
- id: mypy
|
||||
exclude: ^docs/conf.py
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
### Packaging
|
||||
|
||||
- Upgrade to mypy 1.6.1 (#4049)
|
||||
- Upgrade to mypy 1.7.1 (#4049) (#4069)
|
||||
|
||||
### Parser
|
||||
|
||||
|
@ -121,7 +121,7 @@ macos-max-compat = true
|
||||
enable-by-default = false
|
||||
dependencies = [
|
||||
"hatch-mypyc>=0.16.0",
|
||||
"mypy==1.6.1",
|
||||
"mypy==1.7.1",
|
||||
"click==8.1.3", # avoid https://github.com/pallets/click/issues/2558
|
||||
]
|
||||
require-runtime-dependencies = true
|
||||
@ -187,7 +187,7 @@ CC = "clang"
|
||||
build-frontend = { name = "build", args = ["--no-isolation"] }
|
||||
# Unfortunately, hatch doesn't respect MACOSX_DEPLOYMENT_TARGET
|
||||
before-build = [
|
||||
"python -m pip install 'hatchling==1.18.0' hatch-vcs hatch-fancy-pypi-readme 'hatch-mypyc>=0.16.0' 'mypy==1.6.1' 'click==8.1.3'",
|
||||
"python -m pip install 'hatchling==1.18.0' hatch-vcs hatch-fancy-pypi-readme 'hatch-mypyc>=0.16.0' 'mypy==1.7.1' 'click==8.1.3'",
|
||||
"""sed -i '' -e "600,700s/'10_16'/os.environ['MACOSX_DEPLOYMENT_TARGET'].replace('.', '_')/" $(python -c 'import hatchling.builders.wheel as h; print(h.__file__)') """,
|
||||
]
|
||||
|
||||
|
@ -39,7 +39,6 @@
|
||||
Set,
|
||||
Tuple,
|
||||
Union,
|
||||
cast,
|
||||
)
|
||||
|
||||
from blib2to3.pgen2.grammar import Grammar
|
||||
@ -262,11 +261,9 @@ def add_whitespace(self, start: Coord) -> None:
|
||||
def untokenize(self, iterable: Iterable[TokenInfo]) -> str:
|
||||
for t in iterable:
|
||||
if len(t) == 2:
|
||||
self.compat(cast(Tuple[int, str], t), iterable)
|
||||
self.compat(t, iterable)
|
||||
break
|
||||
tok_type, token, start, end, line = cast(
|
||||
Tuple[int, str, Coord, Coord, str], t
|
||||
)
|
||||
tok_type, token, start, end, line = t
|
||||
self.add_whitespace(start)
|
||||
self.tokens.append(token)
|
||||
self.prev_row, self.prev_col = end
|
||||
|
Loading…
Reference in New Issue
Block a user