Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:functools-partial-call
Feb 9, 2025
Merged

Improve support for functools.partial of overloaded callable protocol#18639
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:functools-partial-call

Conversation

@hauntsaninja

Copy link
Copy Markdown
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
@github-actions

github-actions Bot commented Feb 9, 2025

Copy link
Copy Markdown
Contributor

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
@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