Skip to content
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

Static type hint error on class pandera DataFrame #1207

Merged
merged 4 commits into from
Jun 1, 2023

Conversation

manel-ab
Copy link
Contributor

I stated an error referencing this issue: https://github.com/unionai-oss/pandera/issues/1205.
As commented by @cosmicBboy, here is my solution.

@cosmicBboy
Copy link
Collaborator

thanks! sorry for this bit of process, but could you follow the steps here to get the DCO check to pass?

…aFrame

Signed-off-by: manel4 <manel@amalfianalytics.com>
Signed-off-by: manel4 <manel@amalfianalytics.com>
@manel-ab
Copy link
Contributor Author

thanks! sorry for this bit of process, but could you follow the steps here to get the DCO check to pass?

Done! I also added another commit to use the schema paratemer instead of the generic type. If it does not fit you, let me know.

@cosmicBboy
Copy link
Collaborator

Done! I also added another commit to use the schema paratemer instead of the generic type

mypy doesn't seem to like this: https://github.com/unionai-oss/pandera/actions/runs/5134262937/jobs/9239769839?pr=1207

Feel free to type: ignore this if you can't find a way to make this work the right way.

@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f401617) 97.23% compared to head (e356563) 97.23%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1207   +/-   ##
=======================================
  Coverage   97.23%   97.23%           
=======================================
  Files          65       65           
  Lines        5067     5067           
=======================================
  Hits         4927     4927           
  Misses        140      140           
Impacted Files Coverage Δ
pandera/typing/pandas.py 95.45% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: manel4 <manel@amalfianalytics.com>
@manel-ab
Copy link
Contributor Author

manel-ab commented Jun 1, 2023

Done! I also added another commit to use the schema paratemer instead of the generic type

mypy doesn't seem to like this: https://github.com/unionai-oss/pandera/actions/runs/5134262937/jobs/9239769839?pr=1207

Feel free to type: ignore this if you can't find a way to make this work the right way.

Hi, I have been trying to solve the mypy problem but I cannot come up with anything. It is weird, in pyright works: https://pyright-playground.decorator-factory.su/?gzip=H4sIAM1PeGQC_42QTQvCMAyG7_0VYacWdOCOA8We_APFy5ASZqaFrRttFPz37sup4MEcwkt48-SjCm0D_Oicv4BrujYwmEdHqzEfMazgQJ6CK6eKrh1GIQxsXwaZmESJssYYQcvZXJiTygX0caYKrHXesbUyUl3N9SHSNF30KPaRkV3ZEF_b89LOFHkjMR8nDmRY7yDRvUrerEB8Cx50gSep_qVmf1PNFxX783U67eU8KxHoTljb_o8kUYkPQ_bL8AQOuJLBdQEAAA%3D%3D

whereas in mypy does not: https://mypy-play.net/?mypy=latest&python=3.11&flags=verbose&gist=3cb8319b768b1be2e91fbf77347c7a57

So I just added the type:ignore as commented by you.

Signed-off-by: manel4 <manel@amalfianalytics.com>
@cosmicBboy
Copy link
Collaborator

thanks, and congrats on your first contribution to pandera @manel-ab ! 🚀

@cosmicBboy cosmicBboy merged commit 01bcef2 into unionai-oss:main Jun 1, 2023
@manel-ab
Copy link
Contributor Author

manel-ab commented Jun 2, 2023

thanks, and congrats on your first contribution to pandera @manel-ab ! rocket

thank you!

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.

2 participants