ruff
67403254 - [ty] Restrict uncached raw signature access (#25866)

Commit
159 days ago
[ty] Restrict uncached raw signature access (#25866) ## Summary This follows up on [the post-merge review](https://github.com/astral-sh/ruff/pull/25761#discussion_r3395933654) of #25761. `FunctionLiteral::last_definition_raw_signature` bypasses the tracked `FunctionType` query and therefore must only be called for a function defined in the same module. After #25761, the method was visible throughout the `types` module, making it easy for a future caller to accidentally introduce a cross-module AST dependency and over-invalidation. This restores the method's privacy and routes the existing same-module callers through a dedicated `same_module_uncached_raw_signature` wrapper. The wrapper's name and documentation make the restriction explicit, while cross-module callers continue to use the tracked query.
Author
Parents
Loading