Skip to content

Switch from mypy to pyright #120

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

Open
supersergiy opened this issue Nov 27, 2022 · 0 comments
Open

Switch from mypy to pyright #120

supersergiy opened this issue Nov 27, 2022 · 0 comments
Labels
enhancement New feature or request typing

Comments

@supersergiy
Copy link
Member

supersergiy commented Nov 27, 2022

mypy is buggy with ParamSpecs which forces us to insert type-ignore pragmas in certain scenarios.
pyright is faster, less buggy, and gives more helpful error messages. However it doesn't support custom plugings, so some of the mazepa decorators would have to be retyped. pyright design doesn't allow us to add custom decorators on top of attrs(init=True), so all of the flow schema classes and taskable operation classes would have to have custom __init__'s. pyright doesn't support bounding a TypeVar by a Union, so some @overload's would have to be added, specifically in the tensor_ops module. Lastly, some type stub modifications would need to be done for torch and pytorch_lightning, and possibly numpy.

mypy bug trackers:

@supersergiy supersergiy added enhancement New feature or request typing labels Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request typing
Projects
None yet
Development

No branches or pull requests

1 participant