MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _report_source_priority

Function _report_source_priority

deployments/desktop/shared/agents.py:728–748  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

726
727
728def _report_source_priority(path: Path) -> int:
729 resolved = path.resolve()
730 notes_git_dir = _configured_reading_notes_git_dir()
731 if notes_git_dir is not None:
732 try:
733 resolved.relative_to(notes_git_dir.resolve())
734 return 30
735 except ValueError:
736 pass
737 notes_root = _configured_notes_root_dir()
738 if notes_root is not None:
739 try:
740 resolved.relative_to(notes_root.resolve())
741 return 20
742 except ValueError:
743 pass
744 try:
745 resolved.relative_to((PROJECT_ROOT / "data" / "exports").resolve())
746 return 0
747 except ValueError:
748 return 10
749
750
751def _all_report_records() -> List[Dict[str, Any]]:

Callers 1

_all_report_recordsFunction · 0.85

Tested by

no test coverage detected