BadPython.com
Submit Bad Python
Suggestion for
"Overly explicit empty-checks"
Do not use explicit comparison, subclasses of list might be given to a function, but will compare false to []
def list_check(ls: List[int]): if not ls: return None else: do_action_with_list(ls)
Next Suggestion:
use len() == 0 to check for empty list