Skip to content

Fix: Filter noise and refine regex in AST reference extraction#340

Merged
vicsanity623 merged 3 commits into
pyob-evolution-v4-1781233382from
pyob-evolution-v5-1781233562
Jun 12, 2026
Merged

Fix: Filter noise and refine regex in AST reference extraction#340
vicsanity623 merged 3 commits into
pyob-evolution-v4-1781233382from
pyob-evolution-v5-1781233562

Conversation

@pyob-bot

Copy link
Copy Markdown
Collaborator

Summary of Changes

  • Updated the AST node processing logic to exclude common keywords (self, None, True, False) from potential_refs when parsing Python files.
  • Adjusted the fallback regex pattern for Python code parsing to increase the minimum identifier length from 3 to 4 characters.

Technical Impact

  • Reduces false positives in reference tracking by filtering out language-reserved keywords and common built-ins.
  • Improves the precision of the fallback regex mechanism by enforcing a stricter character count, which helps mitigate noise when AST parsing fails and the system falls back to regex-based extraction.

@vicsanity623 vicsanity623 merged commit 23415ba into pyob-evolution-v4-1781233382 Jun 12, 2026
1 check passed
@vicsanity623 vicsanity623 deleted the pyob-evolution-v5-1781233562 branch June 12, 2026 03:12
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