Added section on plugins to the comparison with mypy.

This commit is contained in:
Eric Traut 2023-07-22 08:25:37 -07:00
parent a40ed76fa7
commit a34eb58fc9

View File

@ -503,3 +503,9 @@ y: float
x, y = (3, 4)
```
### Plugins
Mypy supports a plug-in mechanism, whereas pyright does not. Mypy plugins allow developers to extend mypys capabilities to accommodate libraries that rely on behaviors that cannot be described using the standard type checking mechanisms.
Pyright maintainers have made the decision not to support plug-ins because of their many downsides: discoverability, maintainability, cost of development for the plug-in author, cost of maintenance for the plug-in object model and API, security, performance (especially latency — which is critical for language servers), and robustness. Instead, we have taken the approach of working with the typing community and library authors to extend the type system so it can accommodate more use cases. An example of this is [PEP 681](https://peps.python.org/pep-0681/), which introduced `dataclass_transform`.