blob: d169f40010156157e35a80693cfcf42dcd7e0097 [file] [log] [blame] [edit]
[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
f(a=A(), b=B(), a=A()) # E: "f" gets multiple values for keyword argument "a"
class A: pass
class B: pass
[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]