Repository navigation
FamilyFlattened: admit cached_property identity projections - #158
Merged
Merged
Conversation
A cached_property returning its receiver's declared_name projects declaration identity exactly like a property; only the descriptor spelling differed. The recognized standard-library descriptors are now one declared set, read for bare imports and module-qualified decorators alike. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
trissim
enabled auto-merge
October 30, 2026 06:40
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.
FamilyFlattened.identity_returnaccepted onlyproperty(bare,from builtins import, orbuiltins.property). Afunctools.cached_propertywhose body isreturn self.value.declared_nameis the same declaration-identity projection, but it was counted as name transport. This is the false positive on agent-comms #3589 (FamilyText.summary, disclosure_text.py), which order P930 edit 9 assigns to root.Change:
FamilyFlattened.descriptorsdeclares the recognized descriptors once, as(module, name)pairs:builtins.propertyandfunctools.cached_property.from M import name [as alias]andimport M [as alias]both resolve through that set. Shadowed names are still refused, using the existing write-count rule.test_identity_projection_is_not_string_redispatchgains thefrom functools import cached_propertyandfunctools.cached_propertyspellings.Checked (not pytest) on the #3589 disclosure_text.py: 0 sites, down from 1. The aliased
ft.cached_propertycounts 0. A shadowedcached_property = fstill counts 1.🤖 Generated with Claude Code