| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fe7f9f2 commit ab27827
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,14 +15,14 @@ | |||
| 15 | 15 | ||
| 16 | 16 | # typing --------------------------------------------------- | |
| 17 | 17 | ||
| 18 | - from typing import Any, Sequence, Union, TYPE_CHECKING | ||
| 18 | + from typing import Any, Sequence, TYPE_CHECKING, Union | ||
| 19 | 19 | ||
| 20 | - from git.types import PathLike, Old_commit_ish | ||
| 20 | + from git.types import Commit_ish, PathLike | ||
| 21 | 21 | ||
| 22 | 22 | if TYPE_CHECKING: | |
| 23 | - from git.repo import Repo | ||
| 24 | 23 | from git.objects import Commit | |
| 25 | 24 | from git.refs import RemoteReference | |
| 25 | + from git.repo import Repo | ||
| 26 | 26 | ||
| 27 | 27 | # ------------------------------------------------------------------- | |
| 28 | 28 | ||
@@ -62,7 +62,7 @@ def orig_head(self) -> SymbolicReference: | |||
| 62 | 62 | ||
| 63 | 63 | def reset( | |
| 64 | 64 | self, | |
| 65 | - commit: Union[Old_commit_ish, SymbolicReference, str] = "HEAD", | ||
| 65 | + commit: Union[Commit_ish, SymbolicReference, str] = "HEAD", | ||
| 66 | 66 | index: bool = True, | |
| 67 | 67 | working_tree: bool = False, | |
| 68 | 68 | paths: Union[PathLike, Sequence[PathLike], None] = None, | |
@@ -99,7 +99,7 @@ def reset( | |||
| 99 | 99 | if index: | |
| 100 | 100 | mode = "--mixed" | |
| 101 | 101 | ||
| 102 | - # Tt appears some git versions declare mixed and paths deprecated. | ||
| 102 | + # It appears some git versions declare mixed and paths deprecated. | ||
| 103 | 103 | # See http://github.com/Byron/GitPython/issues#issue/2. | |
| 104 | 104 | if paths: | |
| 105 | 105 | mode = None | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,24 +1,20 @@ | |||
| 1 | 1 | # This module is part of GitPython and is released under the | |
| 2 | 2 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 3 | 3 | ||
| 4 | - from git.util import ( | ||
| 5 | - LazyMixin, | ||
| 6 | - IterableObj, | ||
| 7 | - ) | ||
| 4 | + from git.util import IterableObj, LazyMixin | ||
| 8 | 5 | from .symbolic import SymbolicReference, T_References | |
| 9 | 6 | ||
| 10 | - | ||
| 11 | 7 | # typing ------------------------------------------------------------------ | |
| 12 | 8 | ||
| 13 | - from typing import Any, Callable, Iterator, Type, Union, TYPE_CHECKING | ||
| 14 | - from git.types import Old_commit_ish, PathLike, _T | ||
| 9 | + from typing import Any, Callable, Iterator, TYPE_CHECKING, Type, Union | ||
| 10 | + | ||
| 11 | + from git.types import AnyGitObject, PathLike, _T | ||
| 15 | 12 | ||
| 16 | 13 | if TYPE_CHECKING: | |
| 17 | 14 | from git.repo import Repo | |
| 18 | 15 | ||
| 19 | 16 | # ------------------------------------------------------------------------------ | |
| 20 | 17 | ||
| 21 | - | ||
| 22 | 18 | __all__ = ["Reference"] | |
| 23 | 19 | ||
| 24 | 20 | # { Utilities | |
@@ -81,7 +77,7 @@ def __str__(self) -> str: | |||
| 81 | 77 | # @ReservedAssignment | |
| 82 | 78 | def set_object( | |
| 83 | 79 | self, | |
| 84 | - object: Union[Old_commit_ish, "SymbolicReference", str], | ||
| 80 | + object: Union[AnyGitObject, "SymbolicReference", str], | ||
| 85 | 81 | logmsg: Union[str, None] = None, | |
| 86 | 82 | ) -> "Reference": | |
| 87 | 83 | """Special version which checks if the head-log needs an update as well. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments