Debian Codegraph @

test/static_analysis/comprehensions.py

raw symbols SCIP
1 [a + 1 for a in [1, 2]]
2
3 #! 3 type-error-operation
4 [a + '' for a in [1, 2]]
5 #! 3 type-error-operation
6 (a + '' for a in [1, 2])
7
8 #! 12 type-error-not-iterable
9 [a for a in 1]
10
11 tuple(str(a) for a in [1])
12
13 #! 8 type-error-operation
14 tuple(a + 3 for a in [''])
15
16 # ----------
17 # Some variables within are not defined
18 # ----------
19
20 abcdef = []
21 #! 12 name-error
22 [1 for a in NOT_DEFINFED for b in abcdef if 1]
23
24 #! 25 name-error
25 [1 for a in [1] for b in NOT_DEFINED if 1]
26
27 #! 12 name-error
28 [1 for a in NOT_DEFINFED for b in [1] if 1]
29
30 #! 19 name-error
31 (1 for a in [1] if NOT_DEFINED)
32
33 # ----------
34 # unbalanced sides.
35 # ----------
36
37 # ok
38 (1 for a, b in [(1, 2)])
39 #! 13 value-error-too-few-values
40 (1 for a, b, c in [(1, 2)])
41 #! 10 value-error-too-many-values
42 (1 for a, b in [(1, 2, 3)])