Statistics
| Revision:

gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / functional / too_many_boolean_expressions.py @ 745

History | View | Annotate | Download (682 Bytes)

1
"""Checks for if statements containing too many boolean expressions"""
2

    
3
# pylint: disable=invalid-name
4

    
5
x = y = z = 5
6
if x > -5 and x < 5 and y > -5 and y < 5 and z > -5 and z < 5:  # [too-many-boolean-expressions]
7
    pass
8
elif True and False and 1 and 2 and 3:
9
    pass
10
elif True and False and 1 and 2 and 3 and 4 and 5: # [too-many-boolean-expressions]
11
    pass
12
elif True and (True and True) and (x == 5 or True or True): # [too-many-boolean-expressions]
13
    pass
14
elif True and (True or (x > -5 and x < 5 and (z > -5 or z < 5))): # [too-many-boolean-expressions]
15
    pass
16
elif True == True == True == True == True == True:
17
    pass
18

    
19
if True and False and 1 and 2 and 3:
20
    pass