Sort repeat_read's imports and keep its sed range's names apart
This commit is contained in:
@@ -40,8 +40,8 @@ from rule_hook.call import applied, Call, FILE_TOOLS, parsed_call, text
|
|||||||
from rule_hook.rules import Breach, check, Checked, command_breaches, file_breaches, rules_help
|
from rule_hook.rules import Breach, check, Checked, command_breaches, file_breaches, rules_help
|
||||||
from git_command import commits
|
from git_command import commits
|
||||||
from failure import Failure
|
from failure import Failure
|
||||||
from rule_hook.repeat_read import repeat_breaches
|
|
||||||
from rule_hook.override_log import Log, log_path, logged, print_overrides, write_override
|
from rule_hook.override_log import Log, log_path, logged, print_overrides, write_override
|
||||||
|
from rule_hook.repeat_read import repeat_breaches
|
||||||
from rule_hook.reviewer_report import report_breaches
|
from rule_hook.reviewer_report import report_breaches
|
||||||
from rule_hook.reviewer_rung import reviewer_breaches
|
from rule_hook.reviewer_rung import reviewer_breaches
|
||||||
from shell_command import simple_commands
|
from shell_command import simple_commands
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ Lines are in context when earlier reads' results show each of them, as the file
|
|||||||
import dataclasses
|
import dataclasses
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from claude_code.entries import parse_entry, part_text, parts
|
|
||||||
from rule_hook.call import Call, text
|
|
||||||
from rule_hook.rules import Breach
|
from rule_hook.rules import Breach
|
||||||
|
from rule_hook.call import Call, text
|
||||||
|
from claude_code.entries import parse_entry, part_text, parts
|
||||||
from shell_command import resolved, simple_commands
|
from shell_command import resolved, simple_commands
|
||||||
|
|
||||||
# The lines a Read without a limit returns.
|
# The lines a Read without a limit returns.
|
||||||
@@ -57,8 +57,8 @@ def asked_lines(tool: object, given: object, cwd: str, home: str) -> Asked | Non
|
|||||||
if name == "head" and (counted := HEAD_COUNT.fullmatch(" ".join(options) or "-10")):
|
if name == "head" and (counted := HEAD_COUNT.fullmatch(" ".join(options) or "-10")):
|
||||||
return Asked(path, 1, int(counted.group(1)))
|
return Asked(path, 1, int(counted.group(1)))
|
||||||
if name == "sed" and len(options) == 2 and options[0] == "-n" and (ranged := SED_RANGE.fullmatch(options[1])):
|
if name == "sed" and len(options) == 2 and options[0] == "-n" and (ranged := SED_RANGE.fullmatch(options[1])):
|
||||||
first, last = ranged.groups()
|
start, end = ranged.groups()
|
||||||
return Asked(path, int(first), None if last == "$" else int(last or first))
|
return Asked(path, int(start), None if end == "$" else int(end or start))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
|||||||
from rule_hook.rules import blocks, Breach, check, command_breaches, file_breaches, overrides
|
from rule_hook.rules import blocks, Breach, check, command_breaches, file_breaches, overrides
|
||||||
from rule_hook.main import breaches_of
|
from rule_hook.main import breaches_of
|
||||||
from rule_hook.call import Call, parsed_call
|
from rule_hook.call import Call, parsed_call
|
||||||
from rule_hook.repeat_read import repeat_breaches
|
|
||||||
from git_command import Commit, commit_message, commits
|
from git_command import Commit, commit_message, commits
|
||||||
from test_rank_todo import DECISIONS, README, TODO
|
from test_rank_todo import DECISIONS, README, TODO
|
||||||
from test_env import isolated_env
|
from test_env import isolated_env
|
||||||
from model_routing import ladder
|
from model_routing import ladder
|
||||||
from rule_hook.override_log import LogLine, parsed_entry, this_chunks
|
from rule_hook.override_log import LogLine, parsed_entry, this_chunks
|
||||||
|
from rule_hook.repeat_read import repeat_breaches
|
||||||
from rule_hook.reviewer_rung import reviewer_breaches
|
from rule_hook.reviewer_rung import reviewer_breaches
|
||||||
from rule_hook.git import git as rule_hook_git
|
from rule_hook.git import git as rule_hook_git
|
||||||
from model_routing.ladder import Rung
|
from model_routing.ladder import Rung
|
||||||
|
|||||||
Reference in New Issue
Block a user