def file_length(file_path: str) -> int:
    """
    Returns the number of lines in a file
    """
    i = -1
    with open(file_path) as f:
        for i, l in enumerate(f):
            pass
    return i + 1