You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs state they're objects with func, args, and keywords, but they're no longer defined as such, thus cannot be annotated as partial, cannot access the documented attributes etc. For example, this resulted in no problem output with mypy 0.701:
from functools import partial
from typing import Callable
def foo(bar: Callable) -> None:
func = bar
while isinstance(func, partial):
func = func.func
...but now with 0.710 gives:
t.py:6: error: Argument 2 to "isinstance" has incompatible type overloaded function; expected "Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]"
t.py:7: error: "Callable[..., Any]" has no attribute "func"
The text was updated successfully, but these errors were encountered:
In mypy 0.710 due to I suppose commit e45f443, functools partial no longer corresponds with the docs, https://docs.python.org/3/library/functools.html#partial-objects
The docs state they're objects with func, args, and keywords, but they're no longer defined as such, thus cannot be annotated as partial, cannot access the documented attributes etc. For example, this resulted in no problem output with mypy 0.701:
...but now with 0.710 gives:
The text was updated successfully, but these errors were encountered: