Consider merging these comparisons with "in" to "basename not in ('invalidated', 'reported')"
98 # We don't want to include the invalidated files
99 # since there maybe corrupt files
100 # reported utterances are also causing issue, e.g. empty entries
101 if basename != 'invalidated' and basename != 'reported':102 subset_ids.append(basename)
103
104 return subset_ids
Description
To check if a variable is equal to one of many values, combine the values into a tuple and check if the variable is contained in
it instead of checking for equality against each of the values.
This is faster, less verbose, and more readable.
Bad practice
if x == 1 or x == 2 or x == 3:
do_something()
Recommended
if x in (1, 2, 3):
do_something()