-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
tyMulti-file analysis & type inferenceMulti-file analysis & type inference
Milestone
Description
This is a tracking issue to add support for @typing.overload callables.
Reference spec: https://typing.python.org/en/latest/spec/overload.html
Work items
- Represent overloaded callables (functions, methods, etc.) in the type system ([red-knot] Add support for overloaded functions #17366)
- Check assignability / consistent subtyping between overloaded callable and other (possibly overloaded) callable types ([red-knot] Add support for overloaded functions #17366)
- Implement other relation methods for overloaded definitions
- Implement the overload call site evaluation algorithm ty#104
- Try: handle call semantics to overloaded functions as intersection of callables ([red-knot] Update call binding to return all matching overloads #17618)
- [red-knot] Support
typing.get_overloads#17779 -
Update property tests to generate overloaded callables, if possible(refer to [red-knot] Support@typing.overloadand overloaded callable types #15383 (comment)) - Raise diagnostic for invalid overloaded definitions
- If there are < 2 overloaded definitions ([red-knot] Check for invalid overload usages #17609)
- If there is no implementation except in in stub files, protocols, and abstract methods within abstract base classes ([red-knot] Check overloads without an implementation #17681)
- Check for overlapping overloads ty#103
- Check implementation consistency for an overloaded function ty#109
- (Low priority) Decorator consistency between overloads and implementation ([red-knot] Check decorator consistency on overloads #17684)
-
Check if any of the special cased overloaded signatures can be removed(refer to [red-knot] Support@typing.overloadand overloaded callable types #15383 (comment)) - Update hover implementation for overloads to account for the matched signature ty#73
- How to display overloaded signatures in
reveal_type, hover, etc.? (See: Display of overloaded definitions ty#102)
- How to display overloaded signatures in
-
Update goto definition for overloads to go to either the matched signature or the implementation
Metadata
Metadata
Assignees
Labels
tyMulti-file analysis & type inferenceMulti-file analysis & type inference