La referencia de la API está disponible solo en inglés por ahora.

build_ancestor_paths

function
yoltra/diff.py:208
signature
build_ancestor_paths(path): str[]

Build a dotted path's ancestor chain, root-first.

Parameters

NameTypeDescription
pathstrA dotted path; a leading dot is trimmed.

Returns

str[]Each prefix of `path`, shortest first. `[]` for the empty path.

Example

example
>>> build_ancestor_paths("x.y.z")
['x', 'x.y', 'x.y.z']