BadPython.com
Submit Bad Python
Suggestion for
"Overly explicit empty-checks"
Just put the non-empty check in the function itself
def do_action_with_list(ls: List[int]): if not ls: return # do stuff with non-empty list
Next Suggestion:
Do not use explicit comparison, subclasses of list might be given to a function, but will compare false to []