-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
astral-sh/ruff
#18382Labels
bugSomething isn't workingSomething isn't workingcallsIssues relating to call-signature checking and diagnosticsIssues relating to call-signature checking and diagnosticsoverloads
Milestone
Description
Summary
I don't believe this is a duplicate, apologies if otherwise.
from typing import Any
class Spam:
def __getitem__(self, item: int | slice) -> Any:
return (1, 'spam', None)[item]ty reports: `Method `__getitem__` of type `Overload[(key: SupportsIndex, /) -> Unknown, (key: slice[Any, Any, Any], /) -> tuple[Unknown, ...]]` is not callable on object of type `tuple[Literal[1], Literal["spam"], None]` (call-non-callable) [Ln 4, Col 16]`
A
Version
play.ty.dev reports 0.0.0, but locally ty 0.0.1-alpha.5 (3b726d87a 2025-05-17)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcallsIssues relating to call-signature checking and diagnosticsIssues relating to call-signature checking and diagnosticsoverloads