From a094ac1808f7c5fa0653ac075074bb2232223ac1 Mon Sep 17 00:00:00 2001 From: yobmod Date: Mon, 1 Mar 2021 20:18:01 +0000 Subject: add types to git.util and git.__init__ --- git/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'git/__init__.py') 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 -- cgit v1.2.1