mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
fix typehints and quoting
This commit is contained in:
parent
336aae8fc9
commit
8e7853947f
1 changed files with 2 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ def guess_go_dir(remote_url: str) -> str:
|
|||
return 'unknown_src_dir'
|
||||
|
||||
|
||||
def find_go_mod_dir(repo_src_dir):
|
||||
def find_go_mod_dir(repo_src_dir: str) -> str:
|
||||
# First the root
|
||||
if os.path.exists(os.path.join(repo_src_dir, 'go.mod')):
|
||||
return repo_src_dir
|
||||
|
|
@ -66,7 +66,7 @@ def find_go_mod_dir(repo_src_dir):
|
|||
if each.is_dir() and re.fullmatch('v[0-9]+', each.name) \
|
||||
and os.path.exists(os.path.join(each.path, 'go.mod')):
|
||||
return each.path
|
||||
raise FatalError("could not find a go.mod file in this git repository")
|
||||
raise FatalError('could not find a go.mod file in this git repository')
|
||||
|
||||
|
||||
def install_environment(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue