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

Method _sorter

src/commoncode/resource.py:1492–1493  ·  view source on GitHub ↗
(r)

Source from the content-addressed store, hash-verified

1490 children = [get_child(path=child_path(name)) for name in children_names]
1491
1492 def _sorter(r):
1493 return (r.has_children(), r.name.lower(), r.name)
1494
1495 return sorted((c for c in children if c), key=_sorter)
1496

Callers

nothing calls this directly

Calls 1

has_childrenMethod · 0.80

Tested by

no test coverage detected