This (#: lorem ipsum
) is the Sphinx/Google style of attribute documentation (as opposed to the pep-0224 style (""" lorem ipsum """
))
I asked the maintainers of the Python extension about whether there's an existing feature request issue ticket asking for Sphinx-style attribute documentation at https://github.com/microsoft/pylance-release/issues/1576#issuecomment-1668718385. One of them (Rich Chiodo) replied:
I don't believe so. But if it's not part of standard doc strings, it would probably take a lot of up votes for us to add it.
I take that to mean that- no, there is no way to get hover info for this style of attribute doc comments at the time of this writing- at least not with Microsoft's Python extension (the most popular Python extension at the time of this writing). Perhaps there's an extension that adds support for this, but I don't know of it. If you end up making a feature-request issue ticket to the Microsoft Python repo for this feature, please comment here linking to it, or suggest an edit to this post to add a link to it if you cannot comment.