fix: keep docstring-only Python chunks valid - #12346
Conversation
|
@Elonon901001 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @Elonon901001, thanks for your interest in contributing to Haystack! 🙏 This is an automated message to help us keep the review queue healthy. |
|
Hi @Elonon901001, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
Thanks for signing the CLA, @Elonon901001! 🎉 This PR is now ready for review again and the reviewer has been re-assigned. |
Summary
Fixes #12330.
When strip_docstrings=True removes the only statement in a function or class, keep the generated chunk valid by inserting an indented pass. Add a regression test that parses docstring-only functions and classes with ast.parse, plus the required release note.
Validation
I used an AI assistant to help prepare this PR, reviewed the changes, and ran the relevant tests.