◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
5 changes: 3 additions & 2 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
PathLike,
Lit_config_levels,
Commit_ish,
Tree_ish,
assert_never,
)
Expand Down Expand Up @@ -1258,7 +1259,7 @@ def _clone(
def clone(
self,
path: PathLike,
progress: Optional[Callable] = None,
multi_options: Optional[List[str]] = None,
allow_unsafe_protocols: bool = False,
allow_unsafe_options: bool = False,
Expand Down Expand Up @@ -1297,7 +1298,7 @@ def clone_from(
cls,
url: PathLike,
to_path: PathLike,
progress: Optional[Callable] = None,
env: Optional[Mapping[str, str]] = None,
multi_options: Optional[List[str]] = None,
allow_unsafe_protocols: bool = False,
Expand Down
22 changes: 11 additions & 11 deletions git/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,39 @@
from typing import (
Dict,
NoReturn,
Sequence,
Tuple,
Union,
Any,
TYPE_CHECKING,
TypeVar,
) # noqa: F401

if sys.version_info[:2] >= (3, 8):
from typing import (
Literal,
SupportsIndex,
TypedDict,
Protocol,
runtime_checkable,
) # noqa: F401
else:
from typing_extensions import (
Literal,
SupportsIndex, # noqa: F401
TypedDict,
Protocol,
runtime_checkable,
) # noqa: F401

# if sys.version_info[:2] >= (3, 10):
# from typing import TypeGuard # noqa: F401
# else:
# from typing_extensions import TypeGuard # noqa: F401


if sys.version_info[:2] < (3, 9):
PathLike = Union[str, os.PathLike]
else:
# os.PathLike only becomes subscriptable from Python 3.9 onwards
PathLike = Union[str, os.PathLike[str]]

if TYPE_CHECKING:
from git.repo import Repo
Expand All @@ -62,6 +59,9 @@

Lit_config_levels = Literal["system", "global", "user", "repository"]


# def is_config_level(inp: str) -> TypeGuard[Lit_config_levels]:
# # return inp in get_args(Lit_config_level) # only py >= 3.8
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -10,4 +10,4 @@ pytest-icdiff
# pytest-profiling


tox
Toggle all file notes Toggle all file annotations