-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Document library modules #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Do we still need this now that mypy is no longer a separate language? |
I think that having searchable, formatted, cross referenced and pretty online documentation generated from stubs would still be quite useful. Currently users can browse typeshed, but it's not optimal for various reasons:
I doubt that this should have high priority, but something like this could be pretty valuable. Some parts of the original issue description likely won't make sense any more, though. Also, perhaps this issue should be moved to typeshed. |
So this issue is the same as #517? (The syntax highlighting part has been solved) |
Hey, I'd like to revive and close out this issue. Just so I understand, the desire here is to read the Python standard library typing stubs and then automatically generate mypy documentation for them? |
@theodoretliu TBH I am not sure what is the desired scope/goal here. I would rather propose you to work on couple issues related to subsystems you will need for the numeric types. For example #4975 and #4441 (probably in this order because the latter is more complex and bigger). If you really want to work on this one, then @JukkaL is the best person to give more context here. |
@ilevkivskyi Okay, happy to start working on those two as well! I'll still offer to help on this issue in parallel since it seems important (and is the oldest issue) |
I think that the original problem is still relevant, but there are many potential ways to approach this:
I think that 3, 4 and 5 are the most promising approaches. Hosted HTML documentation probably isn't worth it. |
I think a potentially easy way to accomplish this would be to use something like https://github.com/agronholm/sphinx-autodoc-typehints but instead of pulling types from the stdlib sources, pull them from typeshed. Though I also think being able to search a type from the mypy command line would be very handy, and not too difficult to accomplish (famous last words). |
IMHO, the best experience for this kind of thing is having it in IDE. Pyright/Pylance in VSCode is currently working really well for me (get types on hover / as suggestions as you type + go to definition). Unless it's something you want to work on, I vote we just close this issue. |
There are plenty of people who don't use IDEs that provide type information. And even though I use such a program I often wish I could look at the type signature when looking at the Python docs. That being said I think a web based solution is best, so I don't think we need to make this a mypy issue. |
Currently there is no documentation for Python standard library modules, other than a list of supported modules in the wiki. Users will have to rely on Python documentation. This is generally fine, but sometimes it's not obvious how some things translate to mypy. Additionally some Python library features are not supported yet in the stubs.
We should generate automatically HTML documentation based on the library stubs. They don't have to duplicate the Python library reference (at least initially; this would be good to have later in the project). There should be at least the following information per module:
Additionally there should be a contents page that lists all supported modules.
The text was updated successfully, but these errors were encountered: