mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Added section on plugins to the comparison with mypy.
This commit is contained in:
parent
a40ed76fa7
commit
a34eb58fc9
@ -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 mypy’s 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`.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user