Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mypy/nativeparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ def parse_to_binary_ast(
platform=options.platform,
always_true=options.always_true,
always_false=options.always_false,
cache_version=1,
)
return (
ast_bytes,
Expand Down Expand Up @@ -823,6 +824,7 @@ def read_try_stmt(state: State, data: ReadBuffer) -> TryStmt:
if has_name:
var_name = read_str(data)
var_expr = NameExpr(var_name)
read_loc(data, var_expr)
vars_list.append(var_expr)
else:
vars_list.append(None)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ python2 = []
reports = ["lxml"]
install-types = ["pip"]
faster-cache = ["orjson"]
native-parser = ["ast-serialize>=0.1.1,<1.0.0"]
native-parser = ["ast-serialize>=0.1.2,<1.0.0"]

[project.urls]
Homepage = "https://www.mypy-lang.org/"
Expand Down
4 changes: 1 addition & 3 deletions test-data/unit/check-statements.test
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,7 @@ def error_in_tuple_union(exc: Tuple[Union[Type[E1], Type[E2]], Union[Type[E3], i
pass
[builtins fixtures/tuple.pyi]

[case testExceptWithMultipleTypes6_no_parallel]
# For no_parallel, see:
# https://github.com/mypyc/ast_serialize/issues/50
[case testExceptWithMultipleTypes6]
from typing import Never

def random() -> bool: ...
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ pytest-cov>=2.10.0
setuptools>=77.0.3
tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.10
pre_commit>=3.5.0
ast-serialize>=0.1.1,<1.0.0
ast-serialize>=0.1.2,<1.0.0
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=test-requirements.txt --strip-extras test-requirements.in
#
ast-serialize==0.1.1
ast-serialize==0.1.2
# via -r test-requirements.in
attrs==25.4.0
# via -r test-requirements.in
Expand Down
Loading