Uh oh!
There was an error while loading. Please reload this page.
Fix a few invalid noqa comments - #11497
Conversation
This comment has been minimized.
This comment has been minimized.
JelleZijlstra
left a comment
There was a problem hiding this comment.
Thanks, suggested two other changes while we're here
| @@ -41,7 +41,7 @@ class WSGIHTTPException(Response, HTTPException): | |||
| def generate_response(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ... | |||
| @property | |||
| def wsgi_response(self) -> Self: ... # type:ignore[override] | |||
There was a problem hiding this comment.
| defwsgi_response(self) ->Self: ... # type:ignore[override] | |
| defwsgi_response(self) ->Self: ... # type:ignore[override] |
There was a problem hiding this comment.
I've seen (and done) that often. Idk if it's just outside a formatter's purview (Ruff formatter/black). Maybe Ruff linting and/or flake8-pyi could check for this stylistic issue.
There was a problem hiding this comment.
Yes, this could be a good lint rule.
There was a problem hiding this comment.
There's 40 instances of type:ignore in the code. I could fix them all at once here if you'd like. It's not too far off the original scope of this PR anyway
| @property | ||
| def wsgi_response(self) -> Self: ... # type:ignore[override] | ||
| def __str__(self) -> str: ... # type:ignore[override] # noqaY029 | ||
| def __str__(self) -> str: ... # type:ignore[override] # noqa: Y029 |
There was a problem hiding this comment.
| def__str__(self) ->str: ... # type:ignore[override] # noqa: Y029 | |
| def__str__(self) ->str: ... # type:ignore[override] # noqa: Y029 |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Extracted from #11496