-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: Overload return type for from_arrow #19231
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #19231 +/- ##
===========================================
- Coverage 79.99% 59.90% -20.10%
===========================================
Files 1527 1527
Lines 209203 209203
Branches 2415 2415
===========================================
- Hits 167352 125313 -42039
- Misses 41303 83342 +42039
Partials 548 548 ☔ View full report in Codecov by Sentry. |
Hmm.. I don't understand I think. How does your IDE know arrow type? Asking @MarcoGorelli @stinodego here. |
I think vscode has its own extra stubs for some popular libraries which are missing them (e.g. IIRC they wrote |
This is nice for people that have Could you confirm what types are inferred for people without stubs installed for various inputs? |
I recall writing that comment about not type-overloading this function after trying to type it a second time (having forgotten that it didn't go well the first time). Perhaps the previous thread will jog some memories as to the exact nature of the downside, because it's definitely a shame not to be able to type it more exactly 🤣 #8011 (comment) |
If pyarrow-stubs isn't installed then it reverts to Any so the only downside is the extra code. It doesn't revert to the first overload. Here's a little bit more on how python and IDEs load types https://peps.python.org/pep-0561/ To make it work all someone needs to do is |
I put in a draft for the full adoption of pyarrow-stubs #19259 |
While pyarrow doesn't have types built in there is pyarrow-stubs. It works well