Also, the import `from os.path import expanduser` isn't being used so you can remove.

But if it was being used, in my opinion it would be better to import it as `import os.path` and use `os.path.expanduser()` in your code. It's useful to have the extra context of where an imported function comes from (in this case, where `expanduser` comes from) and it also means less namespace conflicts (in case you have your own function with the same name as the imported function).