WireViz icon indicating copy to clipboard operation
WireViz copied to clipboard

[internal] Replace`os.path` with `Pathlib`

Open formatc1702 opened this issue 4 years ago • 1 comments

Remove all references to os.path in the code and replace with the equivalents using Pathlib for consistency and robustness.

This includes reducing all type hints from (str, Path) to Path.

formatc1702 avatar Oct 24 '20 20:10 formatc1702

Perhaps @n42 can explain the need for adding the .. in line 13 in wireviz.py? Isn't it enough to insert os.path.dirname(__file__) to find the WireViz modules?

Would the Pathlib equivalent then be Path(__file__).parent? Thanks :)

formatc1702 avatar Oct 26 '20 09:10 formatc1702