Tuple,
)
+import xdg
+
+
Digest16 = NewType('Digest16', str)
Digest32 = NewType('Digest32', str)
def git_cachedir(git_repo: str) -> str:
- # TODO: Consider using pyxdg to find this path.
- return os.path.expanduser(
- '~/.cache/pinch/git/%s' %
+ return os.path.join(
+ xdg.XDG_CACHE_HOME,
+ 'pinch/git',
digest_string(
git_repo.encode()))