(path: Path, line_number: int)
`line_number` is one-indexed! Returns the line if it can be found, returns None if the path doesn't exist
`line_number` is one-indexed! Returns the line if it can be found, returns None if the path doesn't exist
line_number is one - indexed! Returns the line if it can be found returns None if the path doesn t exist
def fetch_line_in_file(path: Path, line_number: int) -> Optional[str]:
    """
    `line_number` is one-indexed! Returns the line if it can be found, returns None if the path doesn't exist
    """
    if not path.exists():
        return None
    with path.open(buffering=1) as fin:  # buffering=1 turns on line-level reads
        return next(itertools.islice(fin, line_number - 1, line_number), None)
def fetch_line_in_file ( path : Path , line_number : int ) -> Optional [ str ] : if not path . exists ( ) : return None with path . open ( buffering = 1 ) as fin : # buffering=1 turns on line-level reads return next ( itertools . islice ( fin , line_number - 1 , line_number ) , None )