python / typing_extensions

Backported and experimental type hints for Python
Other
445 stars 109 forks source link

Add `typing_extensions.TypeExpr` #429

Closed JelleZijlstra closed 5 months ago

JelleZijlstra commented 5 months ago

We should provide TypeExpr from PEP-747 in typing_extensions. @davidfstr are you interested in doing this? The runtime implementation is likely going to be very simple.

Once it's in typing-extensions, I may work on implementing TypeExpr support in pyanalyze since we have some internal use cases.

JelleZijlstra commented 5 months ago

(Relatedly I just enabled autolinking on this repo so PEP-747 points to https://peps.python.org/747.)

srittau commented 5 months ago

(Relatedly I just enabled autolinking on this repo so PEP-747 points to https://peps.python.org/747.)

Witchcraft!

JelleZijlstra commented 5 months ago

For reference this setting is in https://github.com/python/typing_extensions/settings/key_links (which will of course only work if you have sufficiently advanced permissions).

davidfstr commented 5 months ago

Right now my focus is on finalizing the PEP 747 draft itself. I don't presently have enough bandwidth to draft the related code at the same time, so if I were to pick up this issue I don't think I'd start it for another week or two.