Skip to content

String annotations don't create a tooltip on hover #25707

@o-alquimista

Description

@o-alquimista

Example:

import typing

if typing.TYPE_CHECKING:
    from sqlite3 import Cursor

def _session_add_user(
        args: argparse.Namespace, cursor: 'Cursor',
        bc: BasketCase) -> User:

If I hold my mouse cursor over that string annotation, it doesn't open a tooltip for its definition like it does for non-string annotations.

Screenshot of a function definition with the cursor over a string annotation Screenshot of a function definition with the cursor over a non-string annotation

I know PyCharm has this feature.

Documentation: https://docs.python.org/3.10/library/typing.html#typing.TYPE_CHECKING

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionalitytriage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions