Add test and docs for top level mypy: disable-error-code comment#14810
Add test and docs for top level mypy: disable-error-code comment#14810hauntsaninja merged 3 commits intomasterfrom
mypy: disable-error-code comment#14810Conversation
hauntsaninja
left a comment
There was a problem hiding this comment.
This looks good, could you also update the error message here:
Line 494 in d586070
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. |
|
@xitop beginners provide the best feedback for the docs! Thank you for the report 👍 |
|
@hauntsaninja we now have smart error message, thanks for the suggestion :) |
| and self.type_ignores | ||
| and min(self.type_ignores) < self.get_lineno(stmts[0]) | ||
| ): | ||
| if self.type_ignores[min(self.type_ignores)]: |
There was a problem hiding this comment.
We can't use walrus just yet; we still support 3.7
There was a problem hiding this comment.
This is the first time I've used walrus in real code :)
Probably, the last time.
|
According to mypy_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