mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
serialize: fix mypy error
This commit is contained in:
committed by
Peter Rowlands (변기호)
parent
977a1f9f43
commit
c2e4f51479
@@ -101,7 +101,9 @@ def _modify_data(
|
||||
dumper: DumpersFn,
|
||||
fs: Optional["FileSystem"] = None,
|
||||
):
|
||||
exists_fn = fs.exists if fs else os.path.exists
|
||||
exists_fn = cast(
|
||||
Callable[["StrPath"], bool], fs.exists if fs else os.path.exists
|
||||
)
|
||||
file_exists = exists_fn(cast(str, path))
|
||||
data = _load_data(path, parser=parser, fs=fs) if file_exists else {}
|
||||
yield data
|
||||
|
||||
Reference in New Issue
Block a user