Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/m_cli/lint/_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,16 @@ def _find_m_standard() -> Path | None:
"""Find the m-standard repo on disk, if available.

Returns a path ``P`` such that ``P / "integrated" / *.tsv`` resolves
to the integrated TSV files. m-standard's layout has shifted between
a flat ``integrated/`` at the repo root and a nested ``docs/integrated/``;
we accept either.
to the integrated TSV files.
"""
repo_candidates = [
_THIS.parent.parent.parent.parent.parent / "m-standard",
_THIS.parent.parent.parent.parent / "m-standard",
Path.home() / "projects" / "m-standard",
]
for repo in repo_candidates:
for sub in ("", "docs"):
cand = repo / sub if sub else repo
if (cand / "integrated").exists():
return cand
if (repo / "integrated").exists():
return repo
return None


Expand Down
Loading