Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using os.path.splitext() to support Path objects
Using os.path.splitext() is more robust than just str.split(). Additionally, it supports Path objects. Thus, this commit fixes this error: AttributeError: 'PosixPath' object has no attribute 'split' Note: it's my first time using type annotations, so it's likely I made some mistake. It is also relevant to add `| Path` to many other function/method signatures, but I'm not doing it in this commit. I leave this as an exercise/suggestion to the maintainer.
- Loading branch information