(
    base_path: Path, ignore_path: Path, is_init: bool = False
)
Opens this project's ignore file
Opens this project's ignore file
Opens this project s ignore file
def open_ignores(
    base_path: Path, ignore_path: Path, is_init: bool = False
) -> FileIgnore:
    """
    Opens this project's ignore file
    """
    if not ignore_path.exists():
        if not is_init:
            echo_warning(
                f"""'{os.path.relpath(ignore_path, os.getcwd())}' not found; using default ignore patterns.
Please run 'bento init' to configure a {constants.IGNORE_FILE_NAME} for your project.
"""
            )
        ignore_path = (
            Path(os.path.dirname(__file__)) / "configs" / constants.IGNORE_FILE_NAME
        )

    logging.info(f"Loading bento file ignores from {os.path.abspath(ignore_path)}")

    with ignore_path.open() as ignore_lines:
        patterns = Parser(base_path, ignore_path).parse(ignore_lines)
        return FileIgnore(
            base_path=base_path, patterns=patterns, target_paths=[base_path]
        )
def open_ignores ( base_path : Path , ignore_path : Path , is_init : bool = False ) -> FileIgnore : if not ignore_path . exists ( ) : if not is_init : echo_warning ( f"""'{os.path.relpath(ignore_path, os.getcwd())}' not found; using default ignore patterns.
Please run 'bento init' to configure a {constants.IGNORE_FILE_NAME} for your project.
""" ) ignore_path = ( Path ( os . path . dirname ( __file__ ) ) / "configs" / constants . IGNORE_FILE_NAME ) logging . info ( f"Loading bento file ignores from {os.path.abspath(ignore_path)}" ) with ignore_path . open ( ) as ignore_lines : patterns = Parser ( base_path , ignore_path ) . parse ( ignore_lines ) return FileIgnore ( base_path = base_path , patterns = patterns , target_paths = [ base_path ] )