Skip to content

refactor: Use pathlib for paths#39

Draft
moritzscholz wants to merge 1 commit intoCronza:masterfrom
moritzscholz:refactor/pathlib
Draft

refactor: Use pathlib for paths#39
moritzscholz wants to merge 1 commit intoCronza:masterfrom
moritzscholz:refactor/pathlib

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