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
{{ message }}
Repository navigation
Union between a callable and a type not respected by functools.partial #17741
This could be fixed by improving the join logic (improving callable joins would fix many existing mypy issues) or potentially by changing the functools.partial logic to avoid using joins on unions (this could get messy)
Thanks! I've tested mypy from git and there is one less error report now when upgrading mypy (and looks like the others are all either our fault, unused "type: ignore", or a renamed error code). <3
Activity
hauntsaninja commentedon Oct 8, 2024
This is sort of underlying behaviour in mypy that is exposed now that mypy checks functools.partial
E.g. on mypy 1.11 both of these will complain
This could be fixed by improving the join logic (improving callable joins would fix many existing mypy issues) or potentially by changing the functools.partial logic to avoid using joins on unions (this could get messy)
Fix union callees with functools.partial
eli-schwartz commentedon Oct 9, 2024
Thanks! I've tested mypy from git and there is one less error report now when upgrading mypy (and looks like the others are all either our fault, unused "type: ignore", or a renamed error code). <3
Fix union callees with functools.partial (python#17903)
Fix union callees with functools.partial (#17903)