mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-09 18:02:19 +00:00
![]() ## Summary Note this modifies the diagnostics a bit. Previously performing subscript access on something like `NotSubscriptable1 | NotSubscriptable2` would report the full type as not being subscriptable: ``` [non-subscriptable] "Cannot subscript object of type `NotSubscriptable1 | NotSubscriptable2` with no `__getitem__` method" ``` Now each erroneous constituent has a separate error: ``` [non-subscriptable] "Cannot subscript object of type `NotSubscriptable2` with no `__getitem__` method" [non-subscriptable] "Cannot subscript object of type `NotSubscriptable1` with no `__getitem__` method" ``` Closes https://github.com/astral-sh/ty/issues/625 ## Test Plan mdtest --------- Co-authored-by: Carl Meyer <carl@astral.sh> |
||
---|---|---|
.. | ||
annotation.md | ||
builtins.md | ||
callable_instance.md | ||
constructor.md | ||
dunder.md | ||
function.md | ||
getattr_static.md | ||
invalid_syntax.md | ||
methods.md | ||
never.md | ||
overloads.md | ||
str_startswith.md | ||
subclass_of.md | ||
union.md |