The following is valid for type hinting (taken directly from https://www.python.org/dev/peps/pep-0585/ ), but fails to type check.
actual behavior:
[1/1] check testnew
FAILED: /home/gregory/Downloads/testcase/pytest/.pytype/pyi/testnew.pyi
/home/gregory/.venvs/pyffstream/bin/python -m pytype.single --imports_info /home/gregory/Downloads/testcase/pytest/.pytype/imports/testnew.imports --module-name testnew -V 3.9 -o /home/gregory/Downloads/testcase/pytest/.pytype/pyi/testnew.pyi --analyze-annotated --nofail --quick /home/gregory/Downloads/testcase/pytest/testnew.py
File "/home/gregory/Downloads/testcase/pytest/testnew.py", line 1, in <module>: 'list' object is not callable [not-callable]
Expected: l is determined to have type list[str] while being initialized to [].
This is discouraged for types with built in literal syntax (like [] for list()), but it is nevertheless valid. Moreover, one probably can still make use of this syntax with set().
The following is valid for type hinting (taken directly from https://www.python.org/dev/peps/pep-0585/ ), but fails to type check.
actual behavior:
Expected:
lis determined to have typelist[str]while being initialized to[].This is discouraged for types with built in literal syntax (like
[]forlist()), but it is nevertheless valid. Moreover, one probably can still make use of this syntax withset().