|
3 | 3 | # |
4 | 4 | # This module is part of GitPython and is released under |
5 | 5 | # the BSD License: http://www.opensource.org/licenses/bsd-license.php |
6 | | -from git.refs.reference import Reference |
| 6 | + |
7 | 7 | import glob |
8 | 8 | from io import BytesIO |
9 | 9 | import os |
|
74 | 74 | if TYPE_CHECKING: |
75 | 75 | from subprocess import Popen |
76 | 76 | from git.repo import Repo |
| 77 | + from git.refs.reference import Reference |
| 78 | + from git.util import Actor |
77 | 79 |
|
78 | 80 |
|
79 | 81 | StageType = int |
@@ -966,8 +968,8 @@ def move(self, items: Sequence[Union[PathLike, Blob, BaseIndexEntry, Submodule]] |
966 | 968 |
|
967 | 969 | return out |
968 | 970 |
|
969 | | - def commit(self, message: str, parent_commits=None, head: bool = True, author: str = None, |
970 | | - committer: str = None, author_date: str = None, commit_date: str = None, |
| 971 | + def commit(self, message: str, parent_commits=None, head: bool = True, author: Union[None, 'Actor'] = None, |
| 972 | + committer: Union[None, 'Actor'] = None, author_date: str = None, commit_date: str = None, |
971 | 973 | skip_hooks: bool = False) -> Commit: |
972 | 974 | """Commit the current default index file, creating a commit object. |
973 | 975 | For more information on the arguments, see tree.commit. |
@@ -1191,7 +1193,7 @@ def handle_stderr(proc: 'Popen[bytes]', iter_checked_out_files: Iterable[PathLik |
1191 | 1193 | assert "Should not reach this point" |
1192 | 1194 |
|
1193 | 1195 | @default_index |
1194 | | - def reset(self, commit: Union[Commit, Reference, str] = 'HEAD', working_tree: bool = False, |
| 1196 | + def reset(self, commit: Union[Commit, 'Reference', str] = 'HEAD', working_tree: bool = False, |
1195 | 1197 | paths: Union[None, Iterable[PathLike]] = None, |
1196 | 1198 | head: bool = False, **kwargs: Any) -> 'IndexFile': |
1197 | 1199 | """Reset the index to reflect the tree at the given commit. This will not |
|
0 commit comments