Skip to content

Warn when code blocks define Python functions#65

Merged
nonprofittechy merged 7 commits into
mainfrom
warn-code-def
Jul 7, 2026
Merged

Warn when code blocks define Python functions#65
nonprofittechy merged 7 commits into
mainfrom
warn-code-def

Conversation

@nonprofittechy

@nonprofittechy nonprofittechy commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • add warning WG123 / python_code_function_def when a code: block contains a Python def or async def
  • recommend moving helper functions into a Python module or deleting when not necessary
  • add regression coverage for code blocks with and without function definitions

Fixes #64.

Tests

  • Run locally on representative group of repos

@nonprofittechy nonprofittechy merged commit f73db96 into main Jul 7, 2026
4 checks passed
@nonprofittechy nonprofittechy deleted the warn-code-def branch July 7, 2026 16:27
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.

Warn when someone creates a code block with a python def inside

1 participant