From 6d0a52b78ffe07f8fde108104feb816cfa3eee64 Mon Sep 17 00:00:00 2001 From: jpk Date: Fri, 8 Dec 2023 14:42:17 +0100 Subject: [PATCH] Satisfy typechecker --- clickusagemd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clickusagemd.py b/clickusagemd.py index 1feebf9..33f3540 100755 --- a/clickusagemd.py +++ b/clickusagemd.py @@ -2,6 +2,7 @@ import importlib import os +from pathlib import Path from typing import Iterator import click @@ -11,10 +12,10 @@ import toml from clickusagelib.githook import install_hook, uninstall_hook -def find_git_root(path) -> str: +def find_git_root(path) -> Path: git_repo = git.Repo(path, search_parent_directories=True) git_root = git_repo.git.rev_parse("--show-toplevel") - return git_root + return Path(git_root) def iter_commands(