MCPcopy
hub / github.com/python/mypy / is_git_repo

Function is_git_repo

mypy/git.py:10–12  ·  view source on GitHub ↗

Is the given directory version-controlled with git?

(dir: str)

Source from the content-addressed store, hash-verified

8
9
10def is_git_repo(dir: str) -> bool:
11 """Is the given directory version-controlled with git?"""
12 return os.path.exists(os.path.join(dir, ".git"))
13
14
15def have_git() -> bool:

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…