-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CI: run pyright with mypy #43747
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
CI: run pyright with mypy #43747
Conversation
thanks @twoertwein |
I have merged master and done the following:
I get the following error:
Am I missing something.. not familiar with pyright. |
Which numpy version do you have installed? I think I got a similar error when I used an older version of numpy. |
I assume that Do you mind adding a |
If you can confirm that upgrading |
When downgrading numpy to 1.20.0 pyright cannot determine the type anymore: I will create a PR to bump the version of numpy |
I re installed my env, but have the same error with numpy 1.20.3. Trying to upgrade now.. |
Sorry about that, |
I upgraded to numpy 1.21.2, and incidentally got the error:
If running If using git hooks and committing from my IDE (pycharm) I get the following error (and I did add
with
|
I'm sorry for this frustrating experience. Based on your output pyright reads the pyproejct.toml file so it should ignore reportOverlappingOverload errors if you have You could run pyright only during the manual stage by adding |
Don't worry about it. I'm learning and these things happen. If I set stages to manual as described then I get the following issue (I think because I am not including the changes to the pre-commit file in the final commit) (but I see you have a PR that will do this anyway)
|
this is strange since numba 0.53.1 is ok with numpy 1.21.2 (with conda) |
The github action running the pre-commit checks does not install all necessary python packages for type checking. This triggered a few unnecessary
reportOverlappingOverload
by pyright because numpy was not installed.Keep pyright in the pre-commit but disable it on the CI (SKIP=pyright). Instead, run pyright together with mypy in code_checks.sh.