MCPcopy Index your code
hub / github.com/pyinvoke/invoke / subcollection_from_path

Method subcollection_from_path

invoke/collection.py:346–356  ·  view source on GitHub ↗

Given a ``path`` to a subcollection, return that subcollection. .. versionadded:: 1.0

(self, path: str)

Source from the content-addressed store, hash-verified

344 return coll, rest
345
346 def subcollection_from_path(self, path: str) -> "Collection":
347 """
348 Given a ``path`` to a subcollection, return that subcollection.
349
350 .. versionadded:: 1.0
351 """
352 parts = path.split(".")
353 collection = self
354 while parts:
355 collection = collection.collections[parts.pop(0)]
356 return collection
357
358 def __getitem__(self, name: Optional[str] = None) -> Any:
359 """

Callers 4

top_level_pathMethod · 0.80
nested_pathMethod · 0.80
invalid_pathMethod · 0.80
parse_cleanupMethod · 0.80

Calls 1

popMethod · 0.45

Tested by

no test coverage detected