def default_filter_filename(filename):
    # type: (Optional[str]) -> Optional[str]
    """Default filter for filenames.

    Returns either a normalized filename or None.
    You can pass your own filter to init_types_collection().
    """
    if filename is None:
        return None
    elif filename.startswith(TOP_DIR):
        if filename.startswith(TOP_DIR_DOT):
            # Skip subdirectories starting with dot (e.g. .vagrant).
            return None
        else:
            # Strip current directory and following slashes.
            return filename[TOP_DIR_LEN:].lstrip(os.sep)
    elif filename.startswith(os.sep):
        # Skip absolute paths not under current directory.
        return None
    else:
        return filename
def default_filter_filename ( filename ) : if filename is None : return None elif filename . startswith ( TOP_DIR ) : if filename . startswith ( TOP_DIR_DOT ) : return None else : return filename [ TOP_DIR_LEN : ] . lstrip ( os . sep ) elif filename . startswith ( os . sep ) : return None else : return filename
Default filter for filenames.

    Returns either a normalized filename or None.
    You can pass your own filter to init_types_collection().