Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

too_many_boolean_expressions.py 682B

1234567891011121314151617181920
  1. """Checks for if statements containing too many boolean expressions"""
  2. # pylint: disable=invalid-name
  3. x = y = z = 5
  4. if x > -5 and x < 5 and y > -5 and y < 5 and z > -5 and z < 5: # [too-many-boolean-expressions]
  5. pass
  6. elif True and False and 1 and 2 and 3:
  7. pass
  8. elif True and False and 1 and 2 and 3 and 4 and 5: # [too-many-boolean-expressions]
  9. pass
  10. elif True and (True and True) and (x == 5 or True or True): # [too-many-boolean-expressions]
  11. pass
  12. elif True and (True or (x > -5 and x < 5 and (z > -5 or z < 5))): # [too-many-boolean-expressions]
  13. pass
  14. elif True == True == True == True == True == True:
  15. pass
  16. if True and False and 1 and 2 and 3:
  17. pass