src/upgrade_type_hints/utils.py
def flatten_list(_list: list) -> list:
    """
    Flattens a list of nested lists, and filters out falsy values.

    The list [1, 2, [3, [4, 5], None, 6], [7], 8]
     becomes [1, 2, 3, 4, 5, 6, 7, 8]
    """
    while True:
        for index, item in enumerate(_list):
            if not item:
                _list.pop(index)
            if isinstance(item, list):
                _list = list(flatten_to_generator(_list))
                break
        else:
            return _list

    Flattens a list of nested lists, and filters out falsy values.

    The list [1, 2, [3, [4, 5], None, 6], [7], 8]
     becomes [1, 2, 3, 4, 5, 6, 7, 8]
    
Flattens a list of nested lists, and filters out falsy values.
Flattens a list of nested lists and filters out falsy values .
def flatten_list(_list: list) -> list:
    while True:
        for index, item in enumerate(_list):
            if not item:
                _list.pop(index)
            if isinstance(item, list):
                _list = list(flatten_to_generator(_list))
                break
        else:
            return _list
def flatten_list ( _list : list ) -> list : while True : for index , item in enumerate ( _list ) : if not item : _list . pop ( index ) if isinstance ( item , list ) : _list = list ( flatten_to_generator ( _list ) ) break else : return _list
Flattens a list of nested lists, and filters out falsy values.
Flattens a list of nested lists and filters out falsy values .
"""
    Flattens a list of nested lists, and filters out falsy values.

    The list [1, 2, [3, [4, 5], None, 6], [7], 8]
     becomes [1, 2, 3, 4, 5, 6, 7, 8]
    """
_list
list