Skip to content

Support pathlib Paths in mkdir and cleanup - #5233

Open
Flamefire wants to merge 1 commit into
easybuilders:developfrom
Flamefire:pathlib-mkdir
Open

Support pathlib Paths in mkdir and cleanup#5233
Flamefire wants to merge 1 commit into
easybuilders:developfrom
Flamefire:pathlib-mkdir

Conversation

@Flamefire

Copy link
Copy Markdown
Contributor

Working with pathlib is more comfortable than using os.path but mkdir doesn't support it due to string manipulation done at the end. Converting the argument to a Path (no-op if it is already) allows to clean the function up a bit and make it more reliable by using explicit relative_to instead of the substring approach.

Working with `pathlib` is more comfortable than using `os.path` but
`mkdir` doesn't support it due to string manipulation done at the end.
Converting the argument to a `Path` (no-op if it is already) allows to
clean the function up a bit and make it more reliable by using explicit
`relative_to` instead of the substring approach.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants