summaryrefslogtreecommitdiff
path: root/doc/data/messages/s/simplifiable-if-statement/bad.py
blob: 0c9fb317fe202e860be8e5501e02953e4bdb77ec (plain)
1
2
3
4
5
6
7
8
9
FLYING_THINGS = ["bird", "plane", "superman", "this example"]


def is_flying_animal(an_object):
    if isinstance(an_object, Animal) and an_object in FLYING_THINGS:  # [simplifiable-if-statement]
        is_flying = True
    else:
        is_flying = False
    return is_flying