From ceb25f2f1b153649f8bb5243d026942c5bccbf7e Mon Sep 17 00:00:00 2001 From: Rafael Richards Date: Sun, 10 May 2026 20:09:45 -0400 Subject: [PATCH] chore: drop docs/-walk shim in _find_m_standard() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit m-standard merged the docs/integrated/ → integrated/ relocation (m-standard PR #6), so the `("", "docs")` compatibility walk in _find_m_standard() is dead code against any fresh m-standard checkout. Simplification — three lines net: - one-loop walk over repo candidates - direct `repo / "integrated"` probe - docstring trimmed of the layout-shift rationale Verified with the keyword + doctor + LSP symbol tests (46 passed). --- src/m_cli/lint/_keywords.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/m_cli/lint/_keywords.py b/src/m_cli/lint/_keywords.py index e1c8b2e..f8947ec 100644 --- a/src/m_cli/lint/_keywords.py +++ b/src/m_cli/lint/_keywords.py @@ -21,9 +21,7 @@ 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", @@ -31,10 +29,8 @@ def _find_m_standard() -> Path | None: 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