Skip to content

Do we need to add docstrings to the pyi files? #2757

Open
@Starbuck5

Description

@Starbuck5

I feel like I used to see docstrings in my dev environment (VS code), but I don't see them now.

All I see right now is the type information, for example:
image

If I go into event.pyi as a test and replace the ... with a docstring, it shows up:

def event_name(type: int, /) -> str: ...
def set_blocked(type: Optional[_EventTypes], /) -> None:
    """blocked blocked blocked blocked..."""
def set_allowed(type: Optional[_EventTypes], /) -> None: ...
def get_blocked(type: _EventTypes, /) -> bool: ...
def set_grab(grab: bool, /) -> None: ...

If I hover over pygame.event.set_blocked I now see this very insightful information:
image

This seems like a big win if we can solve this in a nice manner.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions