-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing type annotation for maturin project #341
Comments
It looks like griffe (which we use to look up type hints) supports |
I've added a test that uses a stub file, and was able to see the type annotations in the stub. Do you mind checking whether the latest version of quartodoc, and upgrading griffe, find the annotations. Here's the PR with the test: |
I upgraded everything and I still don't see the annotations rendered. But maybe I misunderstand what the output should give? For the function Both functions do not show any types. I would have expected:
|
Ah, it sounds like you're saying the types aren't showing up in the call signature. Is that right? I don't think that's currently implemented, but is definitely worth enabling. If that sounds right, I can use this issue to track implementing annotations in call signatures |
Where would the type annotations currently be displayed? I believe the type in the I would indeed love to see type annotations in the call signatures. You can reuse this issue, but you/I could also start a new one. |
If you omit the type in the Parameters section, it should fill it in based on the signature. For example, something like... def f(x: int):
"""A function.
Parameters
------------
x:
The x parameter
""" Should fill in that x is an int, based on the signature |
I am building a Python module from Rust using maturin. To include type information, I provide a .
pyi
file. The type information is properly handled when using Visual Studio Code for example, but when I try to generate docs with quartodoc I do not see any types for my function arguments and return values.The text was updated successfully, but these errors were encountered: