refactor: update function signatures to accept both str and Path types#187
Conversation
|
@Ayyanaruto , thanks for the great helpt. Could you add tests for this? |
|
Hey @davidberenstein1957 sure 😄 ! |
davidberenstein1957
left a comment
There was a problem hiding this comment.
Hii looks good! Would you be able to use the | operator instead of the Union? Additionally, could you add something like test_deprecation_* to cover the old behavior ?
Sure @davidberenstein1957 , Can you elaborate what you mean by > "Additionally, could you add something like |
5423dec to
b69b70a
Compare
|
@Ayyanaruto there is a tiny error where we should convert the path to string before passing it to the underlying method. Could you fix that? |
Hey @davidberenstein1957, sure! I’m in college at the moment, so I’ll need a little time. I’ll get it fixed as soon as I’m free. |
…cations for backward comaptibility testing
…6 and save.py line 313 and remove extra test_deprecation_* tests
b3333d4 to
ea969e1
Compare
|
Hi @davidberenstein1957 Apologies for the delay I was a bit busy today. Thank you for always reviewing my PRs and for your continued help and support |
|
Hi @Ayyanaruto, could you rebase on
|
|
Oh thanks, sorry for responding late |
Description
This pull request enhances type flexibility across multiple files by replacing
strwithUnion[str, Path]for file path parameters. This change enables functions to accept both string-based paths andPathobjects from thepathlibmodule, improving compatibility and usability. Thepathlib.Pathmodule has also been imported wherever necessary.Related Issue
Fixes #49
Linked Pruna Pro PR: https://github.com/PrunaAI/prunatree/pull/129
Type of Change
Pathandstrfor file-related parameters insaveandloadfunctionssave.py,load.py,smash_config.py, andutils.pyHow Has This Been Tested?
Unit tests run:
test_save.pytest_load.pyChecklist