Skip to content

Remove stray mypy.fastparse import in EDSD parser#128

Merged
nerdoc merged 1 commit into
masterfrom
claude/fix-edsd-mypy-import
Jun 14, 2026
Merged

Remove stray mypy.fastparse import in EDSD parser#128
nerdoc merged 1 commit into
masterfrom
claude/fix-edsd-mypy-import

Conversation

@nerdoc

@nerdoc nerdoc commented Jun 14, 2026

Copy link
Copy Markdown
Member

Summary

pydifact/generator/edsd.py imported Match from mypy.fastparse:

from mypy.fastparse import Match

This broke importing the module at runtime — mypy is a dev-only
dependency (so it's absent in normal installs), and the symbol isn't
even exported from mypy.fastparse. Because edsd is imported by
pydifact.generator.runner, this also blocked the directory generator
entirely.

The imported Match name was never used: every match reference in the
file is a local re.match(...) result or a walrus assignment. The import
is therefore simply removed.

Verification

  • import pydifact.generator.edsd and import pydifact.generator.runner
    now succeed.
  • Full test suite: 147 passed.
  • black --check clean.

https://claude.ai/code/session_01Q4NSyGd8CMCjjCH9gQCsvG


Generated by Claude Code

edsd.py imported `Match` from `mypy.fastparse`, which made importing the
module fail at runtime (`mypy` is a dev-only dependency, and the symbol
isn't even exported there). The name was never used — all `match`
references are local `re.match` results / walrus assignments — so the
import is simply removed. This unblocks importing
pydifact.generator.runner.
@nerdoc nerdoc merged commit af5bb51 into master Jun 14, 2026
10 checks passed
@nerdoc nerdoc deleted the claude/fix-edsd-mypy-import branch June 14, 2026 07:37
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.

2 participants