summaryrefslogtreecommitdiff
path: root/pylint/test/functional/too_many_boolean_expressions.py
blob: b3dc2387e03f5f207a534697d29b6aaa70093e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Checks for if statements containing too many boolean expressions"""

# pylint: disable=invalid-name

x = y = z = 5
if x > -5 and x < 5 and y > -5 and y < 5 and z > -5 and z < 5:  # [too-many-boolean-expressions]
    pass
elif True and False and 1 and 2 and 3:
    pass
elif True and False and 1 and 2 and 3 and 4 and 5: # [too-many-boolean-expressions]
    pass
elif True and (True and True) and (x == 5 or True or True): # [too-many-boolean-expressions]
    pass
elif True and (True or (x > -5 and x < 5 and (z > -5 or z < 5))): # [too-many-boolean-expressions]
    pass
elif True == True == True == True == True == True:
    pass

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