• Synchronise annotations -> docstring

    From Albert-Jan Roskam@21:1/5 to All on Tue Sep 3 23:49:09 2024
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Albert-Jan Roskam on Tue Sep 3 22:21:46 2024
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)