def get_path(self, key, rel_to_cwd=False, rel_to_conf=False):
if key in self.__cli:<EOL><INDENT>path = self.__cli[key]<EOL>from_conf = False<EOL><DEDENT>else:<EOL><INDENT>path = self.__config.get(key)<EOL>from_conf = True<EOL><DEDENT>if not isinstance(path, str):<EOL><INDENT>return None<EOL><DEDENT>res = self.__abspath(path, from_conf)<EOL>if rel_to_cwd:<EOL><INDENT>return os.path.relpath(res, self.__invoke_dir)<EOL><DEDENT>if rel_to_conf:<EOL><INDENT>return os.path.relpath(res, self.__conf_dir)<EOL><DEDENT>return self.__abspath(path, from_conf)<EOL>
Retrieve a path from the config, resolving it against
the invokation directory or the configuration file directory,
depending on whether it was passed through the command-line
or the configuration file.

Args:
    key: str, the key to lookup the path with

Returns:
    str: The path, or `None`