Repository navigation
chore: name error codes in type: ignore and noqa comments - #1890
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1889. Review that first; this PR only contains the last commit.
Why
A bare
# type: ignoresilences every mypy error on its line, including new ones introduced later. A bare# noqadoes the same for Ruff. With 47 baretype: ignorecomments and 11 barenoqacomments, a new bug on one of those lines would go unnoticed.What changed
# type: ignorenow names the codes mypy actually reports on that line, for example# type: ignore[method-assign]. I found them by removing each comment, running mypy and putting back exactly the codes it reported. All of them were still needed, and none were removed.# noqacomments are gone, replaced by real fixes:supabase_auth/__init__.pyre-exports useX as X, the same as realtime since chore: unify ruff config and enable more lint rules #1887.AsyncGoTrueBaseAPI._requestusesraise handle_exception(e) from e, whichB904asks for. This keeps the original HTTP error as__cause__instead of__context__.PGH003andPGH004in the root Ruff config, so new baretype: ignoreandnoqacomments fail CI. Combined withwarn_unused_ignores, which auth, postgrest, realtime and storage already enable, these comments now have to stay accurate.Verification
src/, and mypy passes for all six packages._synctrees were regenerated withbuild-sync.