Skip to content

refactor: extract DSL escaping helpers into escaping.py#210

Open
MohammedAnasNathani wants to merge 1 commit into
alphacrack:mainfrom
MohammedAnasNathani:refactor/escaping-module
Open

refactor: extract DSL escaping helpers into escaping.py#210
MohammedAnasNathani wants to merge 1 commit into
alphacrack:mainfrom
MohammedAnasNathani:refactor/escaping-module

Conversation

@MohammedAnasNathani

Copy link
Copy Markdown

Summary

Closes #195 (first zero-behavior slice of #59).

Moves exactly five symbols out of distill.py into escaping.py:

Symbol Role
DistillError shared error type (vhs_quote raises it)
_grep_flags_and_pattern (?i)grep -qiE
_VHS_REGEX_METAS Go-regexp metachar set
vhs_wait_pattern literal Wait+Screen escape
vhs_quote VHS Type delimiter picker

distill.py re-exports them with # noqa: F401 so every existing
from readme2demo.distill import … keeps working. No grounding
helpers moved. No test file edits. No behavior changes.

Test plan

  • pytest tests/test_distill.py — 47 passed
  • ruff check src/readme2demo/escaping.py src/readme2demo/distill.py clean
  • escaping.py does not import distill (no cycle)

Move DistillError, _grep_flags_and_pattern, _VHS_REGEX_METAS,
vhs_wait_pattern, and vhs_quote into a new module and re-export them
from distill so existing imports keep working. Zero behavior change;
grounding code stays in distill.py.

Closes alphacrack#195
Copilot AI review requested due to automatic review settings July 22, 2026 22:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: carve distill.py's DSL-escaping helpers into escaping.py (zero-behavior slice of #59)

2 participants