Closed
Description
Our "callable type" should be able to represent a callable of arbitrary signature; typing.Callable
can only spell a limited subset of those types.
This also includes implementing subtyping/assignability/equivalence for this type.
- Add a new
CallableType
variant ([red-knot] Understandtyping.Callable
#16493) - Use the new variant for
typing.Callable
([red-knot] Understandtyping.Callable
#16493) - Use the new variant for
lambda
expressions ([red-knot] Inferlambda
expression #16547)- Infer the return type of
lambda
expressions ([red-knot] Inferlambda
return type asUnknown
#16695)
- Infer the return type of
- Implement support for calling a
typing.Callable
i.e.,call
method ([red-knot] Support calling atyping.Callable
#16888) - Implement various relationship methods for the new variant
-
is_assignable_to
([red-knot] Check assignability for two callable types #16845) -
is_gradual_equivalent_to
([red-knot] Check gradual equivalence between callable types #16634) -
is_subtype_of
([red-knot] Check subtype relation between callable types #16804) -
is_equivalent_to
([red-knot] Check whether two callable types are equivalent #16698) -
is_disjoint_form
([red-knot] Disjointness for callable types #17094)
-
- Other methods
-
is_fully_static
([red-knot] Check if callable type is fully static #16633) -
is_single_valued
([red-knot] Understandtyping.Callable
#16493) -
is_singleton
([red-knot] Understandtyping.Callable
#16493) -
member_lookup_with_policy
([red-knot] Callable member lookup, meta type impl #16618) -
static_member
([red-knot] Callable member lookup, meta type impl #16618) -
to_meta_type
([red-knot] Callable member lookup, meta type impl #16618)
-
- Add property tests for relation methods between callable types ([red-knot] Add property tests for callable types #17006)