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

Method siblings

src/commoncode/resource.py:1522–1529  ·  view source on GitHub ↗

Return a sequence of sibling Resource objects for this Resource or an empty sequence.

(self, codebase)

Source from the content-addressed store, hash-verified

1520 return self.has_parent() and self.parent(codebase).has_children()
1521
1522 def siblings(self, codebase):
1523 """
1524 Return a sequence of sibling Resource objects for this Resource
1525 or an empty sequence.
1526 """
1527 if self.has_parent():
1528 return self.parent(codebase).children(codebase)
1529 return []
1530
1531 def ancestors(self, codebase):
1532 """

Callers 9

assembleMethod · 0.80
assembleMethod · 0.80
assembleMethod · 0.80
assembleMethod · 0.80
assembleMethod · 0.80
assembleMethod · 0.80
jstree.min.jsFile · 0.80

Calls 3

has_parentMethod · 0.95
parentMethod · 0.95
childrenMethod · 0.45

Tested by

no test coverage detected