blob: 4a399460396f0715f7b01b12ff72c2028dbf9e34 [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"""
Tor Norbye814f8292014-03-06 17:27:18 -08009 "a"
Tor Norbye3a2425a2013-11-04 10:16:08 -080010
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()
Tor Norbye814f8292014-03-06 17:27:18 -080033"""fake docstring"""
Tor Norbye3a2425a2013-11-04 10:16:08 -080034
35def foo():
36 y = 2
Tor Norbye814f8292014-03-06 17:27:18 -080037 """fake docstring"""
Tor Norbye3a2425a2013-11-04 10:16:08 -080038
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)