mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
![]() ## Summary Add type narrowing for `type(x) is C` conditions (and `else` clauses of `type(x) is not C` conditionals): ```py if type(x) is A: reveal_type(x) # revealed: A else: reveal_type(x) # revealed: A | B ``` closes: #14431, part of: #13694 ## Test Plan New Markdown-based tests. |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |