Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Add test and docs for top levelmypy: disable-error-code comment#14810
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
hauntsaninja left a comment
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.
This looks good, could you also update the error message here:
Line 494 ind586070
| "use `# mypy: disable-error-code=...`" |
xitop commentedMar 1, 2023
Yes, looks fine. Thank you for your work. But regarding the typing and using mypy I'm a beginner, so don't count on my opinion too much. |
sobolevn commentedMar 1, 2023
@xitop beginners provide the best feedback for the docs! Thank you for the report 👍 |
sobolevn commentedMar 1, 2023
@hauntsaninja we now have smart error message, thanks for the suggestion :) |
| andself.type_ignores | ||
| andmin(self.type_ignores)<self.get_lineno(stmts[0]) | ||
| ): | ||
| ifself.type_ignores[min(self.type_ignores)]: |
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.
We can't use walrus just yet; we still support 3.7
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.
This is the first time I've used walrus in real code :)
Probably, the last time.
According tomypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
I went with the smallest change possible.
@xitop, please, take a look. Does it make sense to you? :)
Closes#14750