Answer stability round 1: 0 🔴, 2 🟡 (0 misread); move rank_todo.py's command line out of release_plan/ranking.py and restore the blank lines after imports; the parse_moves docstring fix comes in the prose round
This commit is contained in:
@@ -2,6 +2,8 @@ import pathlib
|
||||
|
||||
from failure import Failure
|
||||
from git_cli import git_repo
|
||||
|
||||
|
||||
def guarded_git(directory: str, *args: str) -> str | Failure:
|
||||
"""What git printed in directory, stripped, run guarded: the hook runs git in a checkout the call has not yet been allowed to touch."""
|
||||
ran = git_repo.git(*args, cwd=directory, guarded=True)
|
||||
|
||||
@@ -5,6 +5,8 @@ from rule_hook.rules import Breach
|
||||
from failure import Failure
|
||||
from rule_hook.git import guarded_git
|
||||
from release_plan import ranking
|
||||
|
||||
|
||||
def todo_breaches(directory: str) -> list[Breach]:
|
||||
top = guarded_git(directory, "rev-parse", "--show-toplevel")
|
||||
if isinstance(top, Failure) or not (pathlib.Path(top) / "todo.md").is_file():
|
||||
|
||||
Reference in New Issue
Block a user