MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / normalize_path

Function normalize_path

aura/utils.py:207–223  ·  view source on GitHub ↗
(
        pth: Union[Path, str],
        absolute: bool=False,
        to_str: bool=True
)

Source from the content-addressed store, hash-verified

205
206@lru_cache()
207def normalize_path(
208 pth: Union[Path, str],
209 absolute: bool=False,
210 to_str: bool=True
211) -> Union[str, Path]:
212 if type(pth) == str:
213 pth = Path(pth)
214
215 pth = cast(Path, pth)
216
217 if absolute:
218 pth = pth.absolute()
219
220 if to_str:
221 return os.fspath(pth)
222 else:
223 return Path(pth)
224
225
226def slotted_dataclass(dataclass_arguments=None, **kwargs):

Callers 2

analyze_wheelFunction · 0.85
_asdictMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected