mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 17:47:24 +01:00
md-naming: keep stale.py as no-op stub
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
20a825e249
commit
a233268b66
18
md_naming/stale.py
Normal file
18
md_naming/stale.py
Normal 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())
|
||||
25
md_naming/tests/test_stale.py
Normal file
25
md_naming/tests/test_stale.py
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user