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

Fix pathlib name to follow standard pathlib.Path #315

Closed
wants to merge 3 commits into from

Conversation

belldandyxtq
Copy link
Member

This PR matches the pfio.v2.pathlib.Path.name with standard pathlib.Path, which only return the file name of the file WITHOUT the directory.

import pathlib
import pfio.v2 as pfio

a = pathlib.Path("dir/file.txt")
b = pfio.pathlib.Path("dir/file.txt")

print(f"name from pathlib {a.name}")
print(f"name from pfio {b.name}")

output:

name from pathlib file.txt
name from pfio dir/file.txt

with this PR

name from pathlib file.txt
name from pfio file.txt

@belldandyxtq belldandyxtq self-assigned this Jul 20, 2023
@belldandyxtq belldandyxtq added the cat:bug Bug report or fix. label Jul 20, 2023
@belldandyxtq belldandyxtq changed the title pathlib name follows standard pathlib.Path Fix pathlib name to follow standard pathlib.Path Jul 20, 2023
@kuenishi
Copy link
Member

This bug is also fixed by #314 and this patch conflicts with it. As #314 fixes issues in wider range, I'll take it and closing this patch so far, but thank you.

@kuenishi kuenishi closed this Jul 21, 2023
@kuenishi kuenishi deleted the pathlib_name branch July 21, 2023 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:bug Bug report or fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants