From e2414121af16474744d012cdb8466de6ae3136e4 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 22 Jul 2018 14:23:39 +0200 Subject: Add type hints here and there --- poezio/xdg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'poezio/xdg.py') diff --git a/poezio/xdg.py b/poezio/xdg.py index e4b336a5..0b63998c 100644 --- a/poezio/xdg.py +++ b/poezio/xdg.py @@ -12,16 +12,17 @@ https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html from pathlib import Path from os import environ +from typing import Dict # $HOME has already been checked to not be None in test_env(). DEFAULT_PATHS = { 'XDG_CONFIG_HOME': Path.home() / '.config', 'XDG_DATA_HOME': Path.home() / '.local' / 'share', 'XDG_CACHE_HOME': Path.home() / '.cache', -} +} # type: Dict[str, Path] -def _get_directory(variable: str): +def _get_directory(variable: str) -> Path: """ returns the default configuration directory path """ -- cgit v1.2.3