Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions autoform_cli/claims.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,6 @@ def cleanup(self) -> int:
removed += 1
return removed

def gc(self) -> int:
"""Compatibility alias for :meth:`cleanup`."""
return self.cleanup()

def heartbeat(
self,
key: str,
Expand Down
52 changes: 0 additions & 52 deletions autoform_cli/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,12 +715,6 @@ def collect(line: str) -> str:
return ordered








def _append_book_navigation(pages: list[Path]) -> None:
"""Add previous/next links to the bottom of Blueprint pages, never global nav."""
if len(pages) < 2:
Expand Down Expand Up @@ -777,26 +771,6 @@ def _book_navigation_link(
)


def _inject_after_title(text: str, block: str) -> str:
"""Place a generated overview immediately after the document's first H1."""
lines = text.splitlines()
fence: tuple[str, int] | None = None
for index, line in enumerate(lines):
fence_match = _FENCE.match(line)
if fence_match:
marker = fence_match.group(1)
if fence is None:
fence = (marker[0], len(marker))
elif marker[0] == fence[0] and len(marker) >= fence[1]:
fence = None
continue
heading = _HEADING.match(line) if fence is None else None
if heading is not None and len(heading.group(1)) == 1:
merged = [*lines[: index + 1], "", block.rstrip(), "", *lines[index + 1 :]]
return "\n".join(merged) + ("\n" if text.endswith("\n") else "")
return text.rstrip() + "\n\n" + block.rstrip() + "\n"


def _inject_after_lead(text: str, block: str) -> str:
"""Place chapter metadata after its opening prose and before the first section."""
lines = text.splitlines()
Expand All @@ -823,7 +797,6 @@ def _inject_after_lead(text: str, block: str) -> str:
return text.rstrip() + "\n\n" + block.rstrip() + "\n"



def _next_target(
graph: Graph,
statuses: dict[str, status.NodeStatus],
Expand Down Expand Up @@ -899,7 +872,6 @@ def _next_target(
return ""



STRUCTURE_PAGE = "structure.md"


Expand Down Expand Up @@ -1332,23 +1304,10 @@ def _render_overview_summary(
'<div class="bp-progress-kicker">Formalization progress</div>'
f'<div class="bp-progress-total">{item_summary}</div>'
f'<div class="bp-progress-states">{states}</div>'
f""
"</div>"
)



def _status_phrase(node_statuses: Iterable[status.NodeStatus]) -> str:
counts = {state.key: 0 for state in status.STATES}
for node_status in node_statuses:
counts[node_status.key] += 1
return " 路 ".join(f"{counts[state.key]} {state.label}" for state in status.STATES if counts[state.key])


def _markdown_table_cell(text: str) -> str:
return text.replace("\\", "\\\\").replace("|", "\\|").replace("[", "\\[").replace("]", "\\]")


def _first_h1(text: str) -> str | None:
for line in text.splitlines():
heading = _HEADING.match(line)
Expand Down Expand Up @@ -1378,17 +1337,6 @@ def _document_body(text: str) -> str:
return "\n".join(kept).strip()


def _shift_headings(text: str, levels: int) -> str:
def shift(line: str) -> str:
heading = _HEADING.match(line)
if heading is None:
return line
level = min(len(heading.group(1)) + levels, 6)
return f"{'#' * level} {heading.group(2)}"

return _outside_fences(text, shift)


def _anchor(node_id: str, group: str) -> str:
"""A stable in-page anchor for a node, unique within its chapter."""
prefix = f"{group}/" if group else ""
Expand Down
1 change: 0 additions & 1 deletion servers/repl/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ class LeanReplConfig:
chunk_size: int = 4096

instance_mem_limit_gb: int = 16
mem_interval_check: float = 1.0
max_retries: int = 1

allowed_imports: frozenset[str] = ALLOWED_IMPORTS
Expand Down
1 change: 0 additions & 1 deletion servers/repl/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

logger = getLogger(__name__)

DEFAULT_PORT = 8990
DEFAULT_RAM_FRACTION = 0.5
DEFAULT_STARTUP_STAGGER_SECONDS = 2.0

Expand Down
Loading