Skip to content

BUG: Fix return_annotation() skipping fallback for C-builtins - #475

Open
knarfS wants to merge 1 commit into
pdoc3:masterfrom
knarfS:issue_474
Open

BUG: Fix return_annotation() skipping fallback for C-builtins#475
knarfS wants to merge 1 commit into
pdoc3:masterfrom
knarfS:issue_474

Conversation

@knarfS

@knarfS knarfS commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Continue fallback when inspect.signature().return_annotation returns Parameter.empty, allowing return annotations to be parsed from C-buildins docstrings.

Remove misleading UserWarning: Error handling return annotation for ....
Empty return annotations are totally normal and expected for many function
signatures.

This fixes #474

@knarfS knarfS changed the title MNT: Fix return_annotation() skipping fallback for C-builtins BUG: Fix return_annotation() skipping fallback for C-builtins Aug 15, 2026
@knarfS
knarfS force-pushed the issue_474 branch 3 times, most recently from ce71eca to c703e86 Compare August 16, 2026 15:22
Continue fallback when `inspect.signature().return_annotation` returns
`Parameter.empty`, allowing return annotations to be parsed from
C-buildins docstrings.

Remove misleading `UserWarning: Error handling return annotation for ...`.
Empty return annotations are totally normal and expected for many function
signatures.

This fixes pdoc3#474
knarfS added a commit to knarfS/smuview that referenced this pull request Aug 29, 2026
The current pdoc3 implementation has several bug regarding pybind11
docstrings. At the moment, these PRs are pending:
- pdoc3/pdoc#475
- pdoc3/pdoc#477

This commit can be reverted when PRs are merged and no new PRs were
added.
knarfS added a commit to knarfS/smuview that referenced this pull request Aug 29, 2026
The current pdoc3 implementation has several bugs regarding pybind11
docstrings. At the moment, these PRs are pending:
- pdoc3/pdoc#475
- pdoc3/pdoc#477

This commit can be reverted when PRs are merged and no new PRs were
added.
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.

return annotations for C-buildins (pybind11) are ignored

1 participant