Skip to content

Commit

Permalink
Link to pyright's list of incompatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Dec 8, 2021
1 parent 868c67e commit dfa725b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ Given the following definition, ``pyright`` will generate static type signatures

.. warning::

``dataclass_transform``-based types are supported provisionally as of ``pyright`` 1.1.135 and ``attrs`` 21.1.
Both the ``pyright`` dataclass_transform_ specification and ``attrs`` implementation may changed in future versions.

The ``pyright`` inferred types are a subset of those supported by ``mypy``, including:

- The generated ``__init__`` signature only includes the attribute type annotations.
It currently does not include attribute ``converter`` types.

- The ``attr.frozen`` decorator is not typed with frozen attributes, which are properly typed via ``attr.define(frozen=True)``.

A `full list <https://github.com/microsoft/pyright/blob/main/specs/dataclass_transforms.md#attrs>`_ of limitations and incompatibilities can be found in pyright's repository.

Your constructive feedback is welcome in both `attrs#795 <https://github.com/python-attrs/attrs/issues/795>`_ and `pyright#1782 <https://github.com/microsoft/pyright/discussions/1782>`_.
Generally speaking, the decision on improving ``attrs`` support in pyright is entirely Microsoft's prerogative though.


.. _mypy: http://mypy-lang.org
Expand Down

0 comments on commit dfa725b

Please sign in to comment.