Skip to content

Commit

Permalink
Revert _local_exists to mirror fsspec behavior
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 Sep 23, 2024
1 parent 5147dfb commit a7ff0c9
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 @@ -579,9 +579,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 a7ff0c9

Please sign in to comment.