mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
![]() ## Summary Implements attribute access on intersection types, which didn't previously work. For example: ```py from typing import Any class P: ... class Q: ... class A: x: P = P() class B: x: Any = Q() def _(obj: A): if isinstance(obj, B): reveal_type(obj.x) # revealed: P & Any ``` Refers to [this comment]. [this comment]: https://github.com/astral-sh/ruff/pull/16416#discussion_r1985040363 ## Test Plan New Markdown tests |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml | ||
mdtest.py | ||
mdtest.py.lock |