Skip to content

Override typing.Any return types in stub file#26

Merged
smartgoo merged 1 commit intokaspanet:mainfrom
smartgoo:stub-fix
Feb 18, 2026
Merged

Override typing.Any return types in stub file#26
smartgoo merged 1 commit intokaspanet:mainfrom
smartgoo:stub-fix

Conversation

@smartgoo
Copy link
Collaborator

Rust functions that return <Bound<'_, PyAny>> (or some lifetime variation) result in auto generated stub file showing return type in Python as typing.Any. Which is not an accurate representation of the return type and results in incorrect documentation on the docs site.

This PR adds correct return types in the generated stub file by using PyO3 stub gen override feature.

@smartgoo smartgoo merged commit 3f6c54a into kaspanet:main Feb 18, 2026
3 checks passed
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.

1 participant