diff --git a/mypy-requirements.txt b/mypy-requirements.txt index b1bcacb89203..8862d3df9a2e 100644 --- a/mypy-requirements.txt +++ b/mypy-requirements.txt @@ -6,4 +6,4 @@ mypy_extensions>=1.0.0 pathspec>=1.0.0 tomli>=1.1.0; python_version<'3.11' librt>=0.15.0; platform_python_implementation != 'PyPy' -ast-serialize>=0.11.1,<1.0.0 +ast-serialize>=0.11.2,<1.0.0 diff --git a/pyproject.toml b/pyproject.toml index a999faf1a5b9..3db4c9c8ddc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ requires = [ "types-psutil", "types-setuptools", # required to work around a mypyc import bug - "ast-serialize>=0.11.1,<1.0.0", + "ast-serialize>=0.11.2,<1.0.0", ] build-backend = "setuptools.build_meta" @@ -59,7 +59,7 @@ dependencies = [ "pathspec>=1.0.0", "tomli>=1.1.0; python_version<'3.11'", "librt>=0.15.0; platform_python_implementation != 'PyPy'", - "ast-serialize>=0.11.1,<1.0.0", + "ast-serialize>=0.11.2,<1.0.0", ] dynamic = ["version"] diff --git a/test-data/unit/check-literal.test b/test-data/unit/check-literal.test index 595e4c7688d9..30173accca0a 100644 --- a/test-data/unit/check-literal.test +++ b/test-data/unit/check-literal.test @@ -3148,3 +3148,20 @@ f(X.a.value) g(X.a.value) h(X.a.value) [builtins fixtures/primitives.pyi] + +[case testInvalidTypeLikeLiteralString] +from typing import Literal + +Foo = Literal[ + "duration[s][pyarrow]", + "duration[ms][pyarrow]", +] +foo: Foo +reveal_type(foo) # N: Revealed type is "Literal['duration[s][pyarrow]'] | Literal['duration[ms][pyarrow]']" + +bar: Literal[ + "duration[s][pyarrow]", + "duration[ms][pyarrow]", +] +reveal_type(bar) # N: Revealed type is "Literal['duration[s][pyarrow]'] | Literal['duration[ms][pyarrow]']" +[builtins fixtures/primitives.pyi] diff --git a/test-requirements.txt b/test-requirements.txt index 59fc72e2aa9a..825b0836f3ad 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --output-file=test-requirements.txt --strip-extras test-requirements.in # -ast-serialize==0.11.1 +ast-serialize==0.11.2 # via -r mypy-requirements.txt attrs==26.1.0 # via -r test-requirements.in