Skip to content

Commit

Permalink
README: Add note about typing_extensions and _typeshed (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Oct 2, 2022
1 parent f715632 commit e3dbe1b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ all cases:
[a few bugs](https://github.com/python/mypy/issues?q=is%3Aopen+is%3Aissue+label%3Atopic-pep-604+label%3Atopic-type-alias)
regarding PEP 604 type aliases.

Note that several error codes recommend using types from `typing_extensions` or
`_typeshed`. Strictly speaking, these packages are not part of the standard
library. However, these packages are included in typeshed's `stdlib/`
directory, meaning that type checkers believe them to be part of the standard
library even if this does not reflect the reality at runtime. As such, since
stubs are never executed at runtime, types from `typing_extensions` and
`_typeshed` can be used freely in a stubs package, even if the package does not
have an explicit dependency on either `typing_extensions` or typeshed.

## License

MIT
Expand Down

0 comments on commit e3dbe1b

Please sign in to comment.