Repository navigation
Annotate Connection._reverse_mapping as ClassVar - #1543
Merged
Merged
Conversation
Newer ruff releases flag this with RUF012. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxWvcwZnJxiFJP2M59
mhils
approved these changes
Oct 28, 2026
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.
The
lintjob is failing on main-based PRs (e.g. #1542) because a newer ruff release (0.17.x) reports RUF012 (mutable default value for class attribute) onConnection._reverse_mappinginsrc/OpenSSL/SSL.py._reverse_mappingis meant to be shared across the class, so this annotates it astyping.ClassVar[...], the same way_methodsis already annotated in the same file.Verified locally:
nox -s lintfails on main with ruff 0.17.3 and passes with this change;nox -s mypypasses.Generated by Claude Code