Skip to content

Fix empty body after docstring stripping#1

Draft
JavaZeroo wants to merge 1 commit into
mainfrom
codex/handle-empty-statement-sequence-in-docstring-removal
Draft

Fix empty body after docstring stripping#1
JavaZeroo wants to merge 1 commit into
mainfrom
codex/handle-empty-statement-sequence-in-docstring-removal

Conversation

@JavaZeroo

Copy link
Copy Markdown
Owner

Summary

  • prevent docstring removal from leaving an empty AST body by inserting a pass
  • add regression test ensuring ast.parse followed by compile(optimize=2) succeeds
  • document the fix in the NEWS file

Testing

  • ./python -OO -m test -j2 test_ast

https://chatgpt.com/codex/tasks/task_e_688de417dbac832d99b1cf0fca84b691

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant