Open Carreau opened 9 months ago
Expanding a bit on this, to both try to get things out of my head, and take the habit of making longer description.
Some of this information is likely necessary for rendering (like do you show def
vs async def
), but can be used for other things, like there is a search field, we could have a is:generator
filter for example, or warn that there is no Yield
section in the docs.
In general we should try to keep information when we can, so that the frontend can decide what an how to render it.
Do we have any cases of this? I could only find examples of "functions" throughout all the toml examples and the tests.
In papyri itself, I don't think there are any in the tests. We should add those.
right now, we store a
kind
to tell us wether something isbuiltins
,generator
...https://github.com/jupyter/papyri/blob/45c158d0e8011fe0bb23e6a5eb4a4b6e4e521245/papyri/signature.py#L90-L99C13
I'm not sure this is the best way as a builtin can be a coroutine function ... etc. It might be a good idea to rethink what we should store and how.