Answer architecture round 5: one shared git command parser for rule-hook and reading-cost, the reflog check unrolled, and rule-hook's Outcome and LogLine named apart from their namesakes
This commit is contained in:
@@ -36,7 +36,8 @@ import sys
|
||||
import time
|
||||
|
||||
from rule_hook.call import applied, Call, FILE_TOOLS, parsed_call, text
|
||||
from rule_hook.rules import Breach, command_breaches, commits, file_breaches, rules_help, verdict, Verdict
|
||||
from rule_hook.rules import Breach, command_breaches, file_breaches, Outcome, rules_help, verdict
|
||||
from git_command import commits
|
||||
from failure import Failure
|
||||
from rule_hook.override_log import Log, log_path, logged, print_overrides, write_override
|
||||
from shell_command import simple_commands
|
||||
@@ -79,7 +80,7 @@ def breaches_of(call: Call, home: str) -> tuple[str, str, list[Breach]] | None:
|
||||
return added, path, file_breaches(path, before, added, after)
|
||||
|
||||
|
||||
def answer(judged: Verdict, what: str, now: float) -> int:
|
||||
def answer(judged: Outcome, what: str, now: float) -> int:
|
||||
for message in judged.messages:
|
||||
print(message, file=sys.stderr)
|
||||
if judged.blocked:
|
||||
|
||||
Reference in New Issue
Block a user