fix: remove pandas.concat signature hook#2173
Merged
cosmicBboy merged 1 commit intounionai-oss:mainfrom Nov 22, 2025
Merged
Conversation
Signed-off-by: Ryo Kitagawa <kitadrum50@gmail.com>
a96100d to
c4a20a7
Compare
cosmicBboy
approved these changes
Nov 22, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2173 +/- ##
===========================================
- Coverage 94.28% 81.48% -12.80%
===========================================
Files 91 137 +46
Lines 7013 10871 +3858
===========================================
+ Hits 6612 8858 +2246
- Misses 401 2013 +1612 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
thanks @kitagry ! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi maintainers! Thank you for nice project!
Summary
Fixes #2124 - Remove pandas.concat signature hook that causes mypy to crash
Problem
MyPy 1.17.1+ crashes with
AttributeError: 'Instance' object has no attribute 'items'when analyzing code that usespd.concat(). This occurs because:InstanceorUnionTypefor concat's first argumentpandas_concat_callbackhook assumes the argument type isUnionTypeand tries to access its.itemsattributeSolution
Remove the
pandas_concat_callbackhook and its associatedget_function_signature_hookmethod entirely because:PANDAS_CONCAT_FALSE_POSITIVESworkarounds since pandas-stubs (now officially maintained by pandas-dev) provides correct typesChanges
get_function_signature_hookmethod fromPanderaPluginpandas_concat_callbackmethodTesting