organize/utils.py
def find_unused_filename(path: Path, separator=' ') -> Path:
    """
    We assume the given path already exists. This function adds a counter to the
    filename until we find a unused filename.
    """
    # TODO: Check whether the assumption can be eliminated for cleaner code.
    # TODO: Optimization: The counter only needs to be parsed once.
    tmp = path
    while True:
        tmp = increment_filename_version(tmp, separator=separator)
        if not tmp.exists():
            return tmp

    We assume the given path already exists. This function adds a counter to the
    filename until we find a unused filename.
    
We assume the given path already exists. This function adds a counter to the
filename until we find a unused filename.
We assume the given path already exists . This function adds a counter to the filename until we find a unused filename .
def find_unused_filename(path: Path, separator=' ') -> Path:
    tmp = path
    while True:
        tmp = increment_filename_version(tmp, separator=separator)
        if not tmp.exists():
            return tmp
def find_unused_filename ( path : Path , separator = ' ' ) -> Path : tmp = path while True : tmp = increment_filename_version ( tmp , separator = separator ) if not tmp . exists ( ) : return tmp
We assume the given path already exists.
We assume the given path already exists .
"""
    We assume the given path already exists. This function adds a counter to the
    filename until we find a unused filename.
    """ # TODO: Check whether the assumption can be eliminated for cleaner code. # TODO: Optimization: The counter only needs to be parsed once.
path
Path
separator