readthedocs / sphinx-autoapi

A new approach to API documentation in Sphinx.
https://sphinx-autoapi.readthedocs.io/
MIT License
417 stars 127 forks source link

Add pound colon #: parsing #344

Open lwpiotr opened 1 year ago

lwpiotr commented 1 year ago

Hello,

Sphinx allows for documenting comments starting with "#:", above or just after the variable. I am not able to use such comments with Read the Docs autoapi, which is a shame. Would it be possible to add their handling to the package?

astrojuanlu commented 1 year ago

Also observing this in poliastro (thanks @humitos) https://github.com/poliastro/poliastro/pull/1569

klieret commented 1 year ago

I also miss this feature a lot (the documentation of dataclasses, namedtuples etc. comes out empty when I use this syntax). I'm surprised this isn't provided by the napoleon sphinx extension (but perhaps sphinx-autoapi uses an independent parser...)

klieret commented 1 year ago

Hi! Do you have any plans to implement this in future releases?

lwpiotr commented 1 year ago

It would be really great if autoapi would support this Sphinx feature...

chrisyeh96 commented 10 months ago

+1 on this! I would love to be able to document my class and instance variables with any of the 3 following styles, all of which are supported by sphinx.ext.autodoc

class MyClass:
    #: documentation
    var: int = 500

    var2: int = 500  #: documentation 2

    var3: int = 500
    """documentation 3"""
bjlittle commented 6 months ago

I'd ❤️ to see this feature land! 🙏