md-naming: keep stale.py as no-op stub

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Krzysztof Rudnicki 2026-11-02 12:03:09 +01:00
parent 20a825e249
commit a233268b66
2 changed files with 43 additions and 0 deletions

18
md_naming/stale.py Normal file
View File

@ -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())

View File

@ -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