File: test49.py

package info (click to toggle)
pychecker 0.8.17-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,856 kB
  • ctags: 1,896
  • sloc: python: 9,301; sh: 131; makefile: 44
file content (37 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (7)
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
'd'

def x():
    d = e = 7
    print d / e
    print d / 3
    print 7 / e
    print 5 / 6

def y1():
    x = 0
    return (x * 100.0) / 10

def y2():
    x = 0
    return (x + 100.0) / 10

def y3():
    x = 0
    return (x - 100.0) / 10

def y4():
    x = 1
    return (x ** 100.0) / 10

def z(e):
    x = 0
    if e:
        x = x + 1
        return (x * 100.0) / 10
    y = 0
    return (x * 100.0) / y

def should_not_warn(a):
    # this warning should be suppressed automatically
    x = int(a)
    return int(x / 5)