• Synchronise annotations -> docstring

    From Albert-Jan Roskam@sjeik_appie@hotmail.com to comp.lang.python on Tue Sep 3 23:49:09 2024
    From Newsgroup: comp.lang.python

    Hi,
    Are there any tools that check whether type annotations and Numpydoc
    strings are consistent?
    I did find this Vim
    plugin: https://lxyuan0420.github.io/posts/til-vim-pydocstring-plugin.
    Looks incredibly useful, but I haven't tried it yet.
    Thanks!
    AJ
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From ram@ram@zedat.fu-berlin.de (Stefan Ram) to comp.lang.python on Tue Sep 3 22:21:46 2024
    From Newsgroup: comp.lang.python

    Albert-Jan Roskam <sjeik_appie@hotmail.com> wrote or quoted:
    Are there any tools that check whether type annotations and Numpydoc
    strings are consistent?

    According to one webpage, the "sphinx-autodoc-typehints" extension
    lets you roll with Python 3 annotations for documenting the types
    of arguments and return values of functions.

    So, you'd have a "single source of truth" again to keep everything
    chill and straightforward.


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From AJ@sjeik.appie@gmail.com to comp.lang.python on Sun Sep 15 09:12:32 2024
    From Newsgroup: comp.lang.python

    On 9/4/24 00:21, ram@zedat.fu-berlin.de wrote:
    Albert-Jan Roskam <sjeik_appie@hotmail.com> wrote or quoted:
    Are there any tools that check whether type annotations and Numpydoc >>strings are consistent?

    According to one webpage, the "sphinx-autodoc-typehints" extension
    lets you roll with Python 3 annotations for documenting the types
    of arguments and return values of functions.

    So, you'd have a "single source of truth" again to keep everything
    chill and straightforward.




    Thanks, I'll have a look. I'm currently using pdoc (or was it pdoc3?) but I
    could go back to Sphinx. I like Markdown better than restructuredText,
    though.
    --- Synchronet 3.20a-Linux NewsLink 1.114