Satisfy typechecker

This commit is contained in:
jpk 2023-12-08 14:42:17 +01:00
parent 2abaddede8
commit 6d0a52b78f
1 changed files with 3 additions and 2 deletions

View File

@ -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(