mirror of https://github.com/astral-sh/ruff
## Summary Infer `Literal[True]` for `isinstance(x, C)` calls when `x: T` and `T` has a bound `B` that satisfies the `isinstance` check against `C`. Similar for constrained typevars. closes https://github.com/astral-sh/ty/issues/1895 ## Test Plan * New Markdown tests * Verified the the example in the linked ticket checks without errors |
||
|---|---|---|
| .. | ||
| annotation.md | ||
| builtins.md | ||
| callable_instance.md | ||
| callables_as_descriptors.md | ||
| constructor.md | ||
| dunder.md | ||
| dunder_import.md | ||
| function.md | ||
| getattr_static.md | ||
| invalid_syntax.md | ||
| methods.md | ||
| never.md | ||
| open.md | ||
| overloads.md | ||
| replace.md | ||
| str_startswith.md | ||
| subclass_of.md | ||
| union.md | ||