MCPcopy
hub / github.com/pex-tool/pex / components

Function components

pex/compatibility.py:260–277  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

258 )
259
260 def components(path):
261 # type: (Text) -> Iterable[Text]
262
263 pieces = deque() # type: Deque[Text]
264
265 def append(piece):
266 if piece and piece != ".":
267 pieces.appendleft(piece)
268
269 head, tail = os.path.split(path)
270 append(tail)
271 while head:
272 if "/" == head:
273 append(head)
274 break
275 head, tail = os.path.split(head)
276 append(tail)
277 return pieces
278
279 prefix = [] # type: List[Text]
280 for atoms in zip(*(components(path) for path in paths)):

Callers 1

commonpathFunction · 0.85

Calls 1

appendFunction · 0.85

Tested by

no test coverage detected