forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
43 lines (34 loc) · 834 Bytes
/
test.py
File metadata and controls
43 lines (34 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# not importing typing so we don't need to filter by location in Ql tests
def func(
pos_only: int = -1,
/,
normal: int = -2,
*args: "Tuple[str]",
keyword_only: int = -3,
**kwargs: "Dict[str, str]",
):
print(pos_only, normal, keyword_only)
print(args)
print(kwargs)
func(1, 2, keyword_only=3)
func(4, normal=5, keyword_only=6)
func(1, 2, "varargs0", "varargs1", keyword_only=3, kwargs0="0", kwargs1="1")
def func2(
pos_req,
pos_w_default: "foo" = None,
pos_w_default2=None,
*,
keyword_req,
keyword_w_default: "foo" = None,
keyword_also_req,
):
print("func2")
print(
pos_req,
pos_w_default,
pos_w_default2,
keyword_req,
keyword_w_default,
keyword_also_req,
)
func2(1, keyword_req=2, keyword_also_req=3)