Skip to content

Commit

Permalink
Revert _local_exists to mirror fsspec behavior (#4186)
Browse files Browse the repository at this point in the history
Signed-off-by: Deepyaman Datta <deepyaman.datta@utexas.edu>
  • Loading branch information
deepyaman authored Oct 18, 2024
1 parent f594c8b commit 82c1223
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kedro/io/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,8 @@ def _load_obj(class_path: str) -> Any | None:
return class_obj


def _local_exists(local_filepath: str) -> bool: # SKIP_IF_NO_SPARK
filepath = Path(local_filepath)
return filepath.exists() or any(par.is_file() for par in filepath.parents)
def _local_exists(filepath: str) -> bool: # SKIP_IF_NO_SPARK
return Path(filepath).exists()


class AbstractVersionedDataset(AbstractDataset[_DI, _DO], abc.ABC):
Expand Down

0 comments on commit 82c1223

Please sign in to comment.