-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Refactor checker error messages #10959
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
Conversation
Can you fix the style error (and also in the other PR)? Then I can review both PRs once all builds are passed. |
@TH3CHARLie I'm unsure why the mypyc build is failing. For some reason it fails to determine the type of |
How about providing explicit type like |
Oh wow, so that didn't work but setting the Anyway, thanks for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM. I notice that some ErrorMessage
s have no associated codes at this moment, will you plan to provide them later?
Yup. Current set of PRs are pure refactors. After this is done, I'll be adding unique error codes for each and every error, like most other linters have. |
Cool, looking forward to that |
Could you please resolve the merge conflict? |
Done :) |
This comment has been minimized.
This comment has been minimized.
I have run mypy_primer locally, and there are no differences in the latest version of this branch :) Command ran: |
@ethanhs @TH3CHARLie Please take another look, anything left for me to do? |
The mypy primer output doesn't seem right if this is just a refactor, especially since |
@ethanhs I added a few more commits which I believe fixes the output, checked by running mypy-primer locally. is there some way to re trigger the action? |
Alright, tidied up the final few bits. |
This comment has been minimized.
This comment has been minimized.
I was 45 commits behind master... does that explain the primer difference? |
@ethanhs PTAL? |
Description
Migrates
checker.py
to use theErrorMessage
class.This is a continuation from the discussion over at #10947
Some notes:
fail
cannot be changed altogether, it has been overloaded using aUnion
to supportErrorMessage
objects as well.fail
calls are still using strings instead ofErrorMessage
objects. This is because some of the strings were re-used in other modules, which will be refactored in later PRs.