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

ENH: Make type hinting compatible with Python 3.9 #149

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

jhlegarreta
Copy link
Collaborator

@jhlegarreta jhlegarreta commented Dec 27, 2024

Make type hinting compatible with Python 3.9: use Union instead of the pipe operator | to support type hints in Python 3.9. The pipe operator was overloaded for writing union types starting Python 3.10: https://peps.python.org/pep-0604/
https://docs.python.org/3.9/library/typing.html
https://docs.python.org/3.10/library/typing.html

Inadvertently let go through in commits 44d0ff6 and 8c18471.

@jhlegarreta jhlegarreta force-pushed the FixPython39TypeHinting branch 2 times, most recently from c022f91 to 807ff78 Compare December 27, 2024 16:12
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.47%. Comparing base (e89ab63) to head (41ed328).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
+ Coverage   64.22%   65.47%   +1.25%     
==========================================
  Files          25       25              
  Lines        2661     2662       +1     
  Branches      365      418      +53     
==========================================
+ Hits         1709     1743      +34     
+ Misses        838      807      -31     
+ Partials      114      112       -2     
Flag Coverage Δ
unittests 64.94% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhlegarreta jhlegarreta force-pushed the FixPython39TypeHinting branch 5 times, most recently from f4c99b7 to f080d32 Compare December 27, 2024 16:37
Make type hinting compatible with Python 3.9: use `Union` instead of the
pipe operator `|` to support type hints in Python 3.9. The pipe operator
was overloaded for writing union types starting Python 3.10:
https://peps.python.org/pep-0604/
https://docs.python.org/3.9/library/typing.html
https://docs.python.org/3.10/library/typing.html

Inadvertently let go through in commits 44d0ff6 and 8c18471.
@jhlegarreta jhlegarreta force-pushed the FixPython39TypeHinting branch from f080d32 to 41ed328 Compare December 27, 2024 16:37
@jhlegarreta
Copy link
Collaborator Author

Sorry Chris, my bad, I did not pay due attention to the failures in PR #147.

@jhlegarreta jhlegarreta marked this pull request as ready for review December 27, 2024 16:38
@effigies
Copy link
Member

Looks good! I started on this locally, but didn't finish and push. Thanks for cleaning it up!

@effigies effigies merged commit cbd9eec into nipreps:main Dec 27, 2024
16 checks passed
@jhlegarreta jhlegarreta deleted the FixPython39TypeHinting branch December 27, 2024 20:24
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