| [case testGivingSameKeywordArgumentTwice] |
| # This test was originally in check-kwargs.test |
| # Python 3.9's new parser started producing a different error message here. Since this isn't the |
| # most important test, to deal with this we'll only run this test with Python 3.9 and later. |
| import typing |
| def f(a: 'A', b: 'B') -> None: pass |
| class A: pass |
| class B: pass |
| f(a=A(), b=B(), a=A()) # E: "f" gets multiple values for keyword argument "a" |
| |
| |
| [case testPEP614] |
| from typing import Callable, List |
| |
| decorator_list: List[Callable[..., Callable[[int], str]]] |
| @decorator_list[0] |
| def f(x: float) -> float: ... |
| reveal_type(f) # N: Revealed type is "def (builtins.int) -> builtins.str" |
| [builtins fixtures/list.pyi] |
| |
| [case testStarredExpressionsInForLoop] |
| # flags: --python-version 3.9 |
| |
| a = b = c = [1, 2, 3] |
| for x in *a, *b, *c: |
| reveal_type(x) # N: Revealed type is "builtins.int" |
| [builtins fixtures/tuple.pyi] |