The file handling via the os.path module comes with several pitfalls, especially when dealing with both UNIX-pathand ntppathstyles. I am not sure if COSIPY is supposed to run on windows as well, but do you see a benefit in refactoring the code to use pathlib module's Path and PurePath classes for path-handling.
It is encouraged to be used anyway, yields better type hinting, offers more flexibility with different systems and is arguably a bit prettier to write.
P.S.: I can't add labels to issues.
The file handling via the
os.pathmodule comes with several pitfalls, especially when dealing with bothUNIX-pathandntppathstyles. I am not sure if COSIPY is supposed to run on windows as well, but do you see a benefit in refactoring the code to usepathlibmodule'sPathandPurePathclasses for path-handling.It is encouraged to be used anyway, yields better type hinting, offers more flexibility with different systems and is arguably a bit prettier to write.
P.S.: I can't add labels to issues.