Skip to content
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

Type annotations are not rendered properly #62

Closed
greyli opened this issue Aug 18, 2021 · 4 comments
Closed

Type annotations are not rendered properly #62

greyli opened this issue Aug 18, 2021 · 4 comments

Comments

@greyli
Copy link

greyli commented Aug 18, 2021

Hi, thanks for the cool project. It seems that the type annotations for the class arguments are not rendered properly. Catch this in Marshmallow docs: https://marshmallow.readthedocs.io/en/stable/marshmallow.validate.html

Take the first And class as an example. Here is the raw definition:

And(*validators: Callable[[Any], Any], error: Optional[str] = None)

Expected output:

And(*validators, error)

Actual output:

And(*validators, Any], error)
  • sphinx==4.1.2
  • autodocsumm==0.2.6
@Chilipp
Copy link
Owner

Chilipp commented Aug 18, 2021

Hey @greyli ! Thanks for your input! Indeed, that does not make sense. I wonder, whether this is a problem of autodocsumm or autosummary.

What do you get when you include

.. autosummary::

    marshmallow.validate.And

?

@greyli
Copy link
Author

greyli commented Aug 18, 2021

It's the same as the old output:

image

Source: https://github.com/marshmallow-code/marshmallow/blob/dev/docs/marshmallow.validate.rst

I think this may be related to sphinx-doc/sphinx#6311, but that issue seems fixed by sphinx-doc/sphinx#6353. Do you think I should report it to Sphinx? I'm a bit confused with autosummary and autodocsumm, sorry.

@Chilipp
Copy link
Owner

Chilipp commented Aug 18, 2021

hey @greyli! yes, this is definitely an issue for the sphinx-doc repository and you should make sure that you use the latest version of sphinx.

I am closing this then.

@Chilipp Chilipp closed this as completed Aug 18, 2021
@greyli
Copy link
Author

greyli commented Aug 18, 2021

I see, thanks!

This issue was closed.
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

No branches or pull requests

2 participants