Debian Codegraph @

test-data/unit/check-python39.test

raw
1 [case testGivingSameKeywordArgumentTwice_no_native_parse]
2 # This test was originally in check-kwargs.test
3 import typing
4 def f(a: 'A', b: 'B') -> None: pass
5 class A: pass
6 class B: pass
7 f(a=A(), b=B(), a=A()) # E: "f" gets multiple values for keyword argument "a"
8
9
10 [case testPEP614]
11 from typing import Callable, List
12
13 decorator_list: List[Callable[..., Callable[[int], str]]]
14 @decorator_list[0]
15 def f(x: float) -> float: ...
16 reveal_type(f) # N: Revealed type is "def (builtins.int) -> builtins.str"
17 [builtins fixtures/list.pyi]
18
19 [case testStarredExpressionsInForLoop]
20 a = b = c = [1, 2, 3]
21 for x in *a, *b, *c:
22 reveal_type(x) # N: Revealed type is "builtins.int"
23 [builtins fixtures/tuple.pyi]