From 8a7535212257bbb65e52b63c4200243e2c573bb4 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Mon, 21 Nov 2022 16:48:43 -0500 Subject: [PATCH] Add link to Python typing docs for type stubs AFAIK there isn't currently a link to the article on ["Type Stubs"](https://typing.readthedocs.io/en/latest/source/stubs.html) in the official Python static typing documentation. This PR adds a link to this documentation, which is the most comprehensive I have seen around type stubs. --- guide/src/python_typing_hints.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guide/src/python_typing_hints.md b/guide/src/python_typing_hints.md index 8104b3f5..6446955b 100644 --- a/guide/src/python_typing_hints.md +++ b/guide/src/python_typing_hints.md @@ -10,6 +10,8 @@ Currently the best solution for the problem is to maintain manually the `*.pyi` > A stubs file only contains a description of the public interface of the module without any implementations. +There is also [extensive documentation on type stubs on the offical Python typing documentation](https://typing.readthedocs.io/en/latest/source/stubs.html). + Probably most Python developers encountered them already when trying to use the IDE "Go to Definition" function on any builtin type. For example the definitions of few standard exceptions look like this: ```python