| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -282,7 +282,7 @@ def iter_items(cls, repo: 'Repo', rev: Union[str, 'Commit', 'SymbolicReference'] | |||
| 282 | 282 | proc = repo.git.rev_list(rev, args_list, as_process=True, **kwargs) | |
| 283 | 283 | return cls._iter_from_process_or_stream(repo, proc) | |
| 284 | 284 | ||
| 285 | - def iter_parents(self, paths: Union[PathLike, Sequence[PathLike]] = '', **kwargs) -> Iterator['Commit']: | ||
| 285 | + def iter_parents(self, paths: Union[PathLike, Sequence[PathLike]] = '', **kwargs: Any) -> Iterator['Commit']: | ||
| 286 | 286 | """Iterate _all_ parents of this commit. | |
| 287 | 287 | ||
| 288 | 288 | :param paths: | |
@@ -362,7 +362,7 @@ def _iter_from_process_or_stream(cls, repo: 'Repo', proc_or_stream: Union[Popen, | |||
| 362 | 362 | def create_from_tree(cls, repo: 'Repo', tree: Union[Tree, str], message: str, | |
| 363 | 363 | parent_commits: Union[None, List['Commit']] = None, head: bool = False, | |
| 364 | 364 | author: Union[None, Actor] = None, committer: Union[None, Actor] = None, | |
| 365 | - author_date: Union[None, str] = None, commit_date: Union[None, str] = None): | ||
| 365 | + author_date: Union[None, str] = None, commit_date: Union[None, str] = None) -> 'Commit': | ||
| 366 | 366 | """Commit the given tree, creating a commit object. | |
| 367 | 367 | ||
| 368 | 368 | :param repo: Repo object the commit should be part of | |
@@ -403,7 +403,7 @@ def create_from_tree(cls, repo: 'Repo', tree: Union[Tree, str], message: str, | |||
| 403 | 403 | else: | |
| 404 | 404 | for p in parent_commits: | |
| 405 | 405 | if not isinstance(p, cls): | |
| 406 | - raise ValueError("Parent commit '%r' must be of type %s" % (p, cls)) | ||
| 406 | + raise ValueError(f"Parent commit '{p!r}' must be of type {cls}") | ||
| 407 | 407 | # end check parent commit types | |
| 408 | 408 | # END if parent commits are unset | |
| 409 | 409 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments