You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a list of dicts annotated with as List[T] where T is a TypedDict. I've found that pytype complains when it has more than 63 elements. Here's a working example (pytype_fail.py):
Expected pytype output: type checks pass, everything is okay.
Actual output with 2023.07.28: fails on the list64 declaration (but not the list63 declaration) with this error:
Computing dependencies
Analyzing 1 sources with 0 local dependencies
ninja: Entering directory `.pytype'
[1/1] check pytype_fail
FAILED: /.../.pytype/pyi/pytype_fail.pyi
/.../python -m pytype.single --imports_info /.../.pytype/imports/pytype_fail.imports --module-name pytype_fail --platform linux -V 3.10 -o /.../.pytype/pyi/pytype_fail.pyi --analyze-annotated --enable-cached-property --nofail --quick /.../pytype_fail.py
File "/.../pytype_fail.py", line 16, in <module>: Type annotation for list64 does not match type of assignment [annotation-type-mismatch]
Annotation: List[T]
Assignment: List[Dict[str, str]]
TypedDict missing keys: a
For more details, see https://google.github.io/pytype/errors.html#annotation-type-mismatch
ninja: build stopped: subcommand failed.
Leaving directory '.pytype'
The text was updated successfully, but these errors were encountered:
I have a list of dicts annotated with as
List[T]
whereT
is aTypedDict
. I've found that pytype complains when it has more than 63 elements. Here's a working example (pytype_fail.py
):Expected pytype output: type checks pass, everything is okay.
Actual output with 2023.07.28: fails on the
list64
declaration (but not thelist63
declaration) with this error:The text was updated successfully, but these errors were encountered: