We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f601242 commit 230bb2cCopy full SHA for 230bb2c
challenges/extreme-variance/question.py
@@ -0,0 +1,22 @@
1
+"""
2
+Annotate function `f` and `g`, to make tests pass.
3
4
+
5
6
+def f(a):
7
+ pass
8
9
10
+def g(a):
11
12
13
14
+## End of your code ##
15
16
+l1: list[int] = [1, 2]
17
+f(l1) # expect-type-error
18
+g(l1)
19
20
+l2: list[int | str] = [1, 2]
21
+f(l2)
22
+g(l2)
challenges/extreme-variance/solution.py
@@ -0,0 +1,24 @@
+from collections.abc import Sequence
+def f(a: list[int | str]):
+def g(a: Sequence[int | str]):
23
24
0 commit comments