Pass mypy on loop_claude
This commit is contained in:
@@ -23,7 +23,8 @@ def read_premises(root) -> str | Stop:
|
||||
|
||||
|
||||
def sections(text) -> dict[str, list[str]]:
|
||||
blocks, fenced = [], False
|
||||
blocks: list[tuple[str | None, list[str]]] = []
|
||||
fenced = False
|
||||
for line in text.splitlines():
|
||||
fenced ^= line.startswith("```")
|
||||
if not fenced and line.startswith("## "):
|
||||
@@ -32,7 +33,7 @@ def sections(text) -> dict[str, list[str]]:
|
||||
blocks.append((None, []))
|
||||
elif blocks and line.strip():
|
||||
blocks[-1][1].append(line)
|
||||
found = {}
|
||||
found: dict[str, list[str]] = {}
|
||||
for name, body in blocks:
|
||||
if name is not None:
|
||||
found.setdefault(name, []).append("\n".join(body))
|
||||
|
||||
Reference in New Issue
Block a user