Open Starbuck5 opened 4 months ago
I remember discussing this in previous issues (I'm not able to find any links RN)
Anyways, my take was that we can either 1) Make or use a tool that can copy the docs from code into the stubs 2) Update the tool being used by VS code to somehow pick up the docs from the implementation?
Basically, I don't want it to be a manually updated thing that adds developer burden
There are lots of possibilities here.
We could generate docs from stubs and have the stubs be the universal source of truth, or vice versa. We could put a universal source of truth for stubs and docs in the code and have everything be generated off that.
Hmmm. I think I like the idea of not having separate .rst
files for docs. We could have all docs as docstrings in the stubs, and generate docs from this. This will be a lot of manual porting/labour work, but it may pay well in the long run
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](https://github.com/pygame-community/pygame-ce/assets/46412508/b3486aa8-6109-4160-be5d-bc7586f0f75f)
If I go into event.pyi as a test and replace the
...
with a docstring, it shows up:If I hover over pygame.event.set_blocked I now see this very insightful information:![image](https://github.com/pygame-community/pygame-ce/assets/46412508/6e77e8df-3673-4328-847b-df4470780cf5)
This seems like a big win if we can solve this in a nice manner.