blob: 71ef96b1cd28dff2f78e3d6e8879d999ffac65e1 [file] [log] [blame]
Tor Norbye3a2425a2013-11-04 10:16:08 -08001<warning descr="Statement seems to have no effect">2 + 3</warning>
2<warning descr="Statement seems to have no effect">string</warning>
3
4def foo():
5 <warning descr="Statement seems to have no effect">3</warning>
6
7def bar():
8 """a"""
9 <warning descr="Statement seems to have no effect">"a"</warning>
10
11[allpats.extend(patlist) for patlist in pats.values()]
12
13class Printer(object):
14 def __lshift__(self, what):
15 print what
16
17cout = Printer()
18cout << "Hello, world" # must not be reported
19
20len(x) if True else len(y)
21
22(foo())
23
24foo(),
25
26x = 3
27""":type: int"""
28
29x = 3
30"""@type: int"""
31
32foo()
33<warning descr="Statement seems to have no effect">"""fake docstring"""</warning>
34
35def foo():
36 y = 2
37 <warning descr="Docstring seems to be misplaced">"""fake docstring"""</warning>
38
39# PY-10755
40def is_good(a):
41 return a > 10
42
43def do_something(a):
44 print a
45
46def process():
47 for a in range(20):
48 is_good(a) and do_something(a)