MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / strip_root_path

Method strip_root_path

src/commoncode/resource.py:1328–1334  ·  view source on GitHub ↗

Return a path relative to the root, stripped from its root segment unless the codebase contains a single file or there is only one segment in the path.

(self)

Source from the content-addressed store, hash-verified

1326
1327 @property
1328 def strip_root_path(self):
1329 """
1330 Return a path relative to the root, stripped from its root segment
1331 unless the codebase contains a single file or there is only one segment
1332 in the path.
1333 """
1334 return strip_first_path_segment(self.path)
1335
1336 @property
1337 def is_dir(self):

Callers

nothing calls this directly

Calls 1

strip_first_path_segmentFunction · 0.85

Tested by

no test coverage detected