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

refactor: Use pathlib for paths #39

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moritzscholz
Copy link

@moritzscholz moritzscholz commented Apr 30, 2022

Hey!

Are you accepting contributions for this?

Is this going in the right direction? I thought it'd be good to first change the internal path-handling to use pathlib and then deal with passing the paths around as pathlib.Path objects instead of strings.

Resolves #23 .

@moritzscholz moritzscholz force-pushed the refactor/pathlib branch 3 times, most recently from bab0e8d to c998e9b Compare April 30, 2022 05:18
@moritzscholz
Copy link
Author

moritzscholz commented Apr 30, 2022

I also slightly refactored hb_editor.WriteToTemp and noticed something. You write:

# snip
                if not os.path.exists(Settings.editor_temp_root):
                    os.mkdir(Settings.editor_temp_root)
# snap

But shouldn't it be Settings.getInstance().editor_temp_root?

@moritzscholz moritzscholz force-pushed the refactor/pathlib branch 2 times, most recently from f5e8926 to 71d7a6b Compare April 30, 2022 05:22
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.

Convert path references to pathlib calls
1 participant