in
PYL-R1714 84 else:
85 if date_group in strftime_options:
86 return func.strftime(strftime_options[date_group], column)
87 elif lookup_type == 'plain' or lookup_type == 'auto': 88 return column
89 except IndexError:
90 pass
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.
if x == 1 or x == 2 or x == 3:
do_something()
if x in (1, 2, 3):
do_something()