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()))
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell rec {
doCheck = true;
- buildInputs = with pkgs; [ python3 ];
+ buildInputs = with pkgs; [ (python3.withPackages (ps: with ps; [ xdg ])) ];
checkInputs = with pkgs; [
mypy
python3Packages.autopep8