Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend typing_extensions instead of mypy_extensions for TypedDict #8023

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/source/more_types.rst
Expand Up @@ -896,7 +896,7 @@ dictionary value depends on the key:

.. code-block:: python

from mypy_extensions import TypedDict
from typing_extensions import TypedDict

Movie = TypedDict('Movie', {'name': str, 'year': int})

Expand Down Expand Up @@ -972,17 +972,17 @@ a subtype of (that is, compatible with) ``Mapping[str, object]``, since

.. note::

You need to install ``mypy_extensions`` using pip to use ``TypedDict``:
You need to install ``typing_extensions`` using pip to use ``TypedDict``:

.. code-block:: text

python3 -m pip install --upgrade mypy-extensions
python3 -m pip install --upgrade typing-extensions

Or, if you are using Python 2:

.. code-block:: text

pip install --upgrade mypy-extensions
pip install --upgrade typing-extensions

Totality
--------
Expand Down Expand Up @@ -1071,7 +1071,7 @@ in Python 3.6 and later:

.. code-block:: python

from mypy_extensions import TypedDict
from typing_extensions import TypedDict

class Movie(TypedDict):
name: str
Expand Down