INNER CODE UNIT · Python
_skill_source
faridrashidi/cnsplots · src/cnsplots/_cli.py:53
def _skill_source() -> Traversable:
return resources.files("cnsplots").joinpath("_agent_skill").joinpath("cnsplots")
def _validate_name(name: str) -> None:
if (
not name
or "\\" in name
or ":" in name
or any(part in ("", ".", "..", _MANIFEST) for part in name.split("/"))
):
raise ValueError(f"unsafe managed file name: {name!r}")
def _checked_path(root: Path, name: str) -> Path:
path = root
for part in name.split("/"):
if path.exists() and not path.is_dir():