-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionenhancement requestNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Calls to functools.partial returns an object of the partial class which cannot be used for static typing.
Describe the solution you'd like
Pyright analyzes the args and kwargs of calls to functools.partial to perform static typing with the resulting partial object.
from functools import partial
def add(a: int, b: int) -> int:
return a + b
add3 = partial(add, 3)
add3("hello") # Pyright should raise an errorStrauman, tkukushkin, Edenhofer, cmditch and 5j9
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionenhancement requestNew feature or requestNew feature or request