MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / _compact_reasons

Function _compact_reasons

tools/test_selector.py:637–644  ·  view source on GitHub ↗
(reasons: list[str])

Source from the content-addressed store, hash-verified

635
636
637def _compact_reasons(reasons: list[str]) -> list[str]:
638 cats = sorted({r.split(":", 1)[1] for r in reasons if r.startswith("category:")})
639 other = [r for r in reasons if not r.startswith("category:")]
640 out = []
641 if cats:
642 out.append("categories: " + ", ".join(cats))
643 out.extend(other)
644 return out
645
646
647def _details_open(summary: str, add_blank: bool = True) -> str:

Callers 1

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected