mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[red-knot] Make Type::signatures()
exhaustive (#17706)
This commit is contained in:
parent
9b9d16c3ba
commit
c9a6b1a9d0
1 changed files with 19 additions and 1 deletions
|
@ -4049,7 +4049,25 @@ impl<'db> Type<'db> {
|
|||
Signatures::single(CallableSignature::todo("Type::Intersection.call()"))
|
||||
}
|
||||
|
||||
_ => Signatures::not_callable(self),
|
||||
// TODO: these are actually callable
|
||||
Type::MethodWrapper(_) | Type::DataclassDecorator(_) => Signatures::not_callable(self),
|
||||
|
||||
// TODO: some `KnownInstance`s are callable (e.g. TypedDicts)
|
||||
Type::KnownInstance(_) => Signatures::not_callable(self),
|
||||
|
||||
Type::PropertyInstance(_)
|
||||
| Type::AlwaysFalsy
|
||||
| Type::AlwaysTruthy
|
||||
| Type::IntLiteral(_)
|
||||
| Type::StringLiteral(_)
|
||||
| Type::BytesLiteral(_)
|
||||
| Type::BooleanLiteral(_)
|
||||
| Type::LiteralString
|
||||
| Type::SliceLiteral(_)
|
||||
| Type::Tuple(_)
|
||||
| Type::BoundSuper(_)
|
||||
| Type::TypeVar(_)
|
||||
| Type::ModuleLiteral(_) => Signatures::not_callable(self),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue