Repository navigation
Add from __future__ import annotations to all src/ Python files - #15371
Merged
Merged
Conversation
96 of the 104 Python source files under `src/` already carried this import; this adds it to the remaining 8 so the convention holds uniformly across the tree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RxhHMqmQbqHobfoidB1iFT
reaperhulk
approved these changes
Jul 31, 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.
96 of the 104 Python source files under
src/already carriedfrom __future__ import annotations. This adds it to the remaining 8 so the convention holds uniformly across the tree:src/_cffi_src/__init__.pysrc/_cffi_src/openssl/__init__.pysrc/cryptography/hazmat/asn1/__init__.pysrc/cryptography/hazmat/bindings/__init__.pysrc/cryptography/hazmat/bindings/openssl/__init__.pysrc/cryptography/hazmat/primitives/__init__.pysrc/cryptography/hazmat/primitives/asymmetric/__init__.pysrc/cryptography/hazmat/primitives/serialization/base.pyThe import is placed after the license header, matching the placement in the files that already had it.
src/_cffi_src/__init__.pywas previously empty, so it now contains only the import line.The
.pyistubs undersrc/cryptography/hazmat/bindings/_rust/are left alone — stub files are never evaluated at runtime and type checkers already treat their annotations lazily, so the import would be a no-op there.No changelog entry, as there is no user-visible behavior change.
Verified with
nox -e flake(ruff check,ruff format --check,mypy,check-sdist), all passing.🤖 Generated with Claude Code
https://claude.ai/code/session_01RxhHMqmQbqHobfoidB1iFT
Generated by Claude Code