File: test48.py

package info (click to toggle)
pychecker 0.8.19-10
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,484 kB
  • ctags: 2,114
  • sloc: python: 9,968; sh: 98; makefile: 13
file content (84 lines) | stat: -rw-r--r-- 1,159 bytes parent folder | download | duplicates (8)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
'd'

class X:
    'd'
    def x(self): pass
    def y(self): pass

def x():
    i, l, d, s, n, e = 0, [], {}, '', None, Ellipsis
    i.has_no_method()
    l.has_no_method()
    d.has_no_method()
    s.has_no_method()
    n.has_no_method()
    e.has_no_method()

    print i.has_no_attr
    print l.has_no_attr
    print d.has_no_attr
    print s.has_no_attr
    print n.has_no_attr
    print e.has_no_attr

    l.sort()
    d.clear()

    d[i] = jj = X()
    jj.a()
    jj.b()
    jj.x()
    jj.y()

def y():
    for j in []:
        print j.a()


class Z:
    'd'
    def __init__(self): pass
    def x(self): pass
    def y(self): pass

def zz():
    tt = Z()
    tt.a()
    tt.b()
    tt.x()
    tt.y()

def abc(a, b, c):
    # these should all generate a warning for doing nothing
    a
    b
    c
    abc
    5
    zz.func_doc
    str

def j343():
    d = {}
    d['HOME']
    l = []
    l[5]
    d, l

def jklasdflksdjf():
  d = {}
  5 + 3
  5 - 3
  5 / 3.
  5 * 3
  5 ** 3
  d.get
  d[1]
  d[1:2]
  d, d
  [d, d]

def print_item_to(fp, boundary):
    # this should not generate a warning, note comma at end
    print >> fp, '\n--' + boundary + '--',