diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87aaccea..9d07313e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,14 @@ Starting with version 4.0.0, `typing_extensions` uses [Semantic Versioning](https://semver.org/). See the documentation for more detail. +# Type stubs + +A stub file for `typing_extensions` is maintained +[in typeshed](https://github.com/python/typeshed/blob/main/stdlib/typing_extensions.pyi). +Because of the special status that `typing_extensions` holds in the typing ecosystem, +the stubs are placed in the standard library in typeshed and distributed as +part of the stubs bundled with individual type checkers. + # Running tests Testing `typing_extensions` can be tricky because many development tools depend on diff --git a/README.md b/README.md index ddc11882..efd3a824 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ The `typing_extensions` module serves two related purposes: - Enable experimentation with new type system PEPs before they are accepted and added to the `typing` module. +`typing_extensions` is treated specially by static type checkers such as +mypy and pyright. Objects defined in `typing_extensions` are treated the same +way as equivalent forms in `typing`. + `typing_extensions` uses [Semantic Versioning](https://semver.org/). The major version will be incremented only for backwards-incompatible changes. @@ -29,7 +33,7 @@ where `x.y` is the first version that includes all features you need. See [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a complete listing of module contents. -## Running tests +## Contributing -To run tests, navigate into the `src/` directory and run -`test_typing_extensions.py`. +See [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md) +for how to contribute to `typing_extensions`.