Skip to content

ENH: Handle union type expressions for Google style docstrings#443

Merged
kernc merged 1 commit intopdoc3:masterfrom
ERosendo:feat-handle-union-type-expression-properly
Jun 22, 2024
Merged

ENH: Handle union type expressions for Google style docstrings#443
kernc merged 1 commit intopdoc3:masterfrom
ERosendo:feat-handle-union-type-expression-properly

Conversation

@ERosendo
Copy link
Copy Markdown
Contributor

@ERosendo ERosendo commented Jun 22, 2024

This PR fixes issue #441 by tweaking the regex expression used to parse Google-style docstrings to handle union-type expressions correctly.

I also updated the test for this docstring format to ensure the fix works as expected and prevent regressions in the future.

@ERosendo ERosendo force-pushed the feat-handle-union-type-expression-properly branch from e3f23b7 to 7686f66 Compare June 22, 2024 15:00
@ERosendo ERosendo force-pushed the feat-handle-union-type-expression-properly branch from 7686f66 to 5bdeee9 Compare June 22, 2024 15:03
@kernc
Copy link
Copy Markdown
Member

kernc commented Jun 22, 2024

Looks good, thanks!

@kernc kernc merged commit d1136ea into pdoc3:master Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

"x | y" does not work but "Union[x, y]" does

2 participants