Files
ImageUtils/.CondaPkg/env/lib/python3.11/site-packages/jsons/deserializers/default_path.py
2023-03-18 20:03:34 +07:00

13 lines
399 B
Python

from pathlib import PurePath
def default_path_deserializer(obj: str, cls: type = PurePath, **kwargs) -> PurePath:
"""
Deserialize a string to a `pathlib.PurePath` object. Since ``pathlib``
implements ``PurePath``, no filename or existence checks are performed.
:param obj: the string to deserialize.
:param kwargs: not used.
:return: a ``str``.
"""
return cls(obj)