Skip to content

Improve support for functools.partial of overloaded callable protocol #18639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

hauntsaninja
Copy link
Collaborator

Resolves #18637

Mypy's behaviour here is not correct (see test case), but this PR makes mypy's behaviour match what it used to be before we added the functools.partial plugin

Support for overloads tracked in #17585

Resolves python#18637

Mypy's behaviour here is not correct (see test case), but this PR
makes mypy's behaviour match what it used to be before we added the
functools.partial plugin
Copy link
Contributor

github-actions bot commented Feb 9, 2025

Diff from mypy_primer, showing the effect of this PR on open source code:

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/flows.py:1929: error: "FlowDecorator" not callable  [misc]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/tests/frame/test_ufunc.py:69: error: Unused "type: ignore" comment  [unused-ignore]
+ pandas/tests/frame/test_ufunc.py:76: error: Unused "type: ignore" comment  [unused-ignore]

@hauntsaninja hauntsaninja merged commit 876f636 into python:master Feb 9, 2025
18 checks passed
@hauntsaninja hauntsaninja deleted the functools-partial-call branch February 9, 2025 06:36
x612skm pushed a commit to x612skm/mypy-dev that referenced this pull request Feb 24, 2025
…python#18639)

Resolves python#18637

Mypy's behaviour here is not correct (see test case), but this PR makes
mypy's behaviour match what it used to be before we added the
functools.partial plugin

Support for overloads tracked in python#17585
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"_RmtreeType" not callable when passed to functools.partial on Python 3.12
1 participant