BadPython.com

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