summaryrefslogtreecommitdiff
path: root/git/__init__.py
diff options
context:
space:
mode:
authoryobmod <yobmod@gmail.com>2021-03-01 20:18:01 +0000
committeryobmod <yobmod@gmail.com>2021-03-01 20:18:01 +0000
commita094ac1808f7c5fa0653ac075074bb2232223ac1 (patch)
tree53ad607894773eae18e9e110a2f72594f79c0311 /git/__init__.py
parent5b0028e1e75e1ee0eea63ba78cb3160d49c1f3a3 (diff)
downloadgitpython-a094ac1808f7c5fa0653ac075074bb2232223ac1.tar.gz
add types to git.util and git.__init__
Diffstat (limited to 'git/__init__.py')
-rw-r--r--git/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/git/__init__.py b/git/__init__.py
index 53440830..e2f960db 100644
--- a/git/__init__.py
+++ b/git/__init__.py
@@ -8,15 +8,18 @@
import inspect
import os
import sys
-
import os.path as osp
+from typing import Optional
+from git.types import PathLike
__version__ = 'git'
+
+
#{ Initialization
-def _init_externals():
+def _init_externals() -> None:
"""Initialize external projects by putting them into the path"""
if __version__ == 'git' and 'PYOXIDIZER' not in os.environ:
sys.path.insert(1, osp.join(osp.dirname(__file__), 'ext', 'gitdb'))
@@ -65,7 +68,7 @@ __all__ = [name for name, obj in locals().items()
#{ Initialize git executable path
GIT_OK = None
-def refresh(path=None):
+def refresh(path:Optional[PathLike]=None) -> None:
"""Convenience method for setting the git executable path."""
global GIT_OK
GIT_OK = False