This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Automate adding Type Annotations to Documentation
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, cooperlees, gvanrossum, levkivskyi, pablogsal, rhettinger, xtreak
Priority: normal Keywords:

Created on 2020-01-03 19:12 by cooperlees, last changed 2022-04-11 14:59 by admin.

Messages (6)
msg359249 - (view) Author: Cooper Lees (cooperlees) * Date: 2020-01-03 19:12
What are people's thoughts on automating adding type annotations to documentation now that Typeshed is mature and Python 2 is EOL?
(Let us never speak of comment annotations)
msg359274 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-01-04 03:50
I am not sure if it was discussed earlier there was a discussion on adding PEP 570 syntax across the docs. This comes at the cost of keeping the types updated. There was also a poc over expanding the signature to view the PEP 570 syntax as needed. 

issue37134
https://bugs.python.org/msg344654
msg359275 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-01-04 03:59
Some discussion on similar proposal earlier : https://mail.python.org/pipermail/python-dev/2017-November/150234.html
msg359276 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-01-04 04:21
This was never blocked on Python 2 (at best we'd do this for the most recent Python 3 release anyway).

I expect it will be quite complex to get the quality of the implementation high enough, but I suppose someone should start with a prototype. I'm not volunteering though. :-)
msg359446 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2020-01-06 18:21
I think a bigger thing is to simply get type annotations to be used in the stdlib first, then we can worry about documenting them as part of the API. :)
msg359449 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-01-06 18:30
Actually I agree with the OP that we could get some mileage out of joining typeshed with the docs, regardless of whether there are annotations in the stdlib.
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83385
2020-01-10 18:56:07levkivskyisetnosy: + levkivskyi
2020-01-06 18:30:12gvanrossumsetmessages: + msg359449
2020-01-06 18:21:58brett.cannonsetnosy: + brett.cannon
messages: + msg359446
2020-01-04 04:21:19gvanrossumsetmessages: + msg359276
2020-01-04 03:59:57xtreaksetmessages: + msg359275
2020-01-04 03:50:10xtreaksetnosy: + rhettinger, pablogsal, gvanrossum, xtreak
messages: + msg359274
2020-01-03 19:12:34cooperleessettype: enhancement
2020-01-03 19:12:25cooperleescreate