Skip to content

initialize_and_read_exclude_file

Source code in library_analyzer/utils/_files.py
def initialize_and_read_exclude_file(exclude_file: Path) -> list[str]:
    exclude_file.parent.mkdir(parents=True, exist_ok=True)
    try:
        with exclude_file.open("r") as f:
            return __read_lines(f)
    except FileNotFoundError:
        return []