From a233268b662cce04ab11b8e9aebe354baa9d7691 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Mon, 2 Nov 2026 12:03:09 +0100 Subject: [PATCH] md-naming: keep stale.py as no-op stub Co-Authored-By: Claude Opus 5.5 --- md_naming/stale.py | 18 ++++++++++++++++++ md_naming/tests/test_stale.py | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 md_naming/stale.py create mode 100644 md_naming/tests/test_stale.py diff --git a/md_naming/stale.py b/md_naming/stale.py new file mode 100644 index 0000000..e124f08 --- /dev/null +++ b/md_naming/stale.py @@ -0,0 +1,18 @@ +"""Retired: kept as a no-op so old CI steps keep passing. + +TODO*.md files are banned and tasks live in the todo app, so there is nothing +left to warn about. Existing `.github/workflows/md-naming.yml` steps still call +`python3 .utils/md_naming/stale.py ...`; this stub accepts and ignores any argv, +prints nothing and exits 0 until those steps are swept out of every repo. +""" + +from __future__ import annotations + + +def main() -> int: + """Do nothing, successfully.""" + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/md_naming/tests/test_stale.py b/md_naming/tests/test_stale.py new file mode 100644 index 0000000..aa787c7 --- /dev/null +++ b/md_naming/tests/test_stale.py @@ -0,0 +1,25 @@ +"""stale.py is a retired no-op; old workflow steps must keep passing.""" + +from __future__ import annotations + +import subprocess +import sys +from pathlib import Path + +from md_naming import stale + +STALE = Path(__file__).resolve().parents[1] / "stale.py" + + +def test_stub_exits_zero_silently_with_any_args() -> None: + result = subprocess.run( + [sys.executable, str(STALE), "--days", "30", "junk", "--nope"], + capture_output=True, + text=True, + check=False, + ) + assert (result.returncode, result.stdout, result.stderr) == (0, "", "") + + +def test_main_returns_zero() -> None: + assert stale.main() == 0