| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 231c3ef commit e166a0a
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,7 +98,7 @@ def new_from_sha(cls, repo: "Repo", sha1: bytes) -> Commit_ish: | |||
| 98 | 98 | New object instance of a type appropriate to represent the given binary sha1 | |
| 99 | 99 | ||
| 100 | 100 | :param sha1: | |
| 101 | - 20 byte binary sha1 | ||
| 101 | + 20 byte binary sha1. | ||
| 102 | 102 | """ | |
| 103 | 103 | if sha1 == cls.NULL_BIN_SHA: | |
| 104 | 104 | # The NULL binsha is always the root commit. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -298,7 +298,7 @@ def iter_items( | |||
| 298 | 298 | The :class:`~git.repo.base.Repo`. | |
| 299 | 299 | ||
| 300 | 300 | :param rev: | |
| 301 | - Revision specifier, see git-rev-parse for viable options. | ||
| 301 | + Revision specifier. See git-rev-parse for viable options. | ||
| 302 | 302 | ||
| 303 | 303 | :param paths: | |
| 304 | 304 | An optional path or list of paths. If set only :class:`Commit`\s that | |
@@ -309,7 +309,7 @@ def iter_items( | |||
| 309 | 309 | ||
| 310 | 310 | * ``max_count`` is the maximum number of commits to fetch. | |
| 311 | 311 | * ``skip`` is the number of commits to skip. | |
| 312 | - * ``since`` all commits since e.g. '1970-01-01'. | ||
| 312 | + * ``since`` selects all commits since some date, e.g. ``"1970-01-01"``. | ||
| 313 | 313 | ||
| 314 | 314 | :return: | |
| 315 | 315 | Iterator yielding :class:`Commit` items. | |
@@ -380,12 +380,13 @@ def stats(self) -> Stats: | |||
| 380 | 380 | def trailers(self) -> Dict[str, str]: | |
| 381 | 381 | """Deprecated. Get the trailers of the message as a dictionary. | |
| 382 | 382 | ||
| 383 | - :note: This property is deprecated, please use either :attr:`trailers_list` or | ||
| 384 | - :attr:`trailers_dict``. | ||
| 383 | + :note: | ||
| 384 | + This property is deprecated, please use either :attr:`trailers_list` or | ||
| 385 | + :attr:`trailers_dict`. | ||
| 385 | 386 | ||
| 386 | 387 | :return: | |
| 387 | - Dictionary containing whitespace stripped trailer information. Only contains | ||
| 388 | - the latest instance of each trailer key. | ||
| 388 | + Dictionary containing whitespace stripped trailer information. | ||
| 389 | + Only contains the latest instance of each trailer key. | ||
| 389 | 390 | """ | |
| 390 | 391 | return {k: v[0] for k, v in self.trailers_dict.items()} | |
| 391 | 392 | ||
@@ -539,7 +540,7 @@ def create_from_tree( | |||
| 539 | 540 | author_date: Union[None, str, datetime.datetime] = None, | |
| 540 | 541 | commit_date: Union[None, str, datetime.datetime] = None, | |
| 541 | 542 | ) -> "Commit": | |
| 542 | - """Commit the given tree, creating a commit object. | ||
| 543 | + """Commit the given tree, creating a :class:`Commit` object. | ||
| 543 | 544 | ||
| 544 | 545 | :param repo: | |
| 545 | 546 | :class:`~git.repo.base.Repo` object the commit should be part of. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -186,8 +186,8 @@ def traverse_trees_recursive( | |||
| 186 | 186 | given tree. | |
| 187 | 187 | ||
| 188 | 188 | :param tree_shas: | |
| 189 | - Iterable of shas pointing to trees. All trees must be on the same level. A | ||
| 190 | - tree-sha may be ``None`` in which case ``None``. | ||
| 189 | + Iterable of shas pointing to trees. All trees must be on the same level. | ||
| 190 | + A tree-sha may be ``None``, in which case ``None``. | ||
| 191 | 191 | ||
| 192 | 192 | :param path_prefix: | |
| 193 | 193 | A prefix to be added to the returned paths on this level. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | # This module is part of GitPython and is released under the | |
| 4 | 4 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 5 | 5 | ||
| 6 | - """Provides an :class:`git.objects.base.Object`-based type for annotated tags. | ||
| 6 | + """Provides an :class:`~git.objects.base.Object`-based type for annotated tags. | ||
| 7 | 7 | ||
| 8 | 8 | This defines the :class:`TagReference` class, which represents annotated tags. | |
| 9 | 9 | For lightweight tags, see the :mod:`git.refs.tag` module. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -166,7 +166,7 @@ class Tree(IndexObject, git_diff.Diffable, util.Traversable, util.Serializable): | |||
| 166 | 166 | ||
| 167 | 167 | Tree as a list: | |
| 168 | 168 | ||
| 169 | - * Access a specific blob using the ``tree['filename']`` notation. | ||
| 169 | + * Access a specific blob using the ``tree["filename"]`` notation. | ||
| 170 | 170 | * You may likewise access by index, like ``blob = tree[0]``. | |
| 171 | 171 | """ | |
| 172 | 172 | ||
@@ -215,8 +215,8 @@ def _set_cache_(self, attr: str) -> None: | |||
| 215 | 215 | # END handle attribute | |
| 216 | 216 | ||
| 217 | 217 | def _iter_convert_to_object(self, iterable: Iterable[TreeCacheTup]) -> Iterator[IndexObjUnion]: | |
| 218 | - """Iterable yields tuples of (binsha, mode, name), which will be converted | ||
| 219 | - to the respective object representation. | ||
| 218 | + """Iterable yields tuples of (binsha, mode, name), which will be converted to | ||
| 219 | + the respective object representation. | ||
| 220 | 220 | """ | |
| 221 | 221 | for binsha, mode, name in iterable: | |
| 222 | 222 | path = join_path(self.path, name) | |
@@ -338,8 +338,8 @@ def traverse( | |||
| 338 | 338 | def list_traverse(self, *args: Any, **kwargs: Any) -> IterableList[IndexObjUnion]: | |
| 339 | 339 | """ | |
| 340 | 340 | :return: | |
| 341 | - :class:`~git.util.IterableList`IterableList with the results of the | ||
| 342 | - traversal as produced by :meth:`traverse` | ||
| 341 | + :class:`~git.util.IterableList` with the results of the traversal as | ||
| 342 | + produced by :meth:`traverse` | ||
| 343 | 343 | ||
| 344 | 344 | Tree -> IterableList[Union[Submodule, Tree, Blob]] | |
| 345 | 345 | """ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -474,7 +474,7 @@ def _traverse( | |||
| 474 | 474 | ignore_self: int = 1, | |
| 475 | 475 | as_edge: bool = False, | |
| 476 | 476 | ) -> Union[Iterator[Union["Traversable", "Blob"]], Iterator[TraversedTup]]: | |
| 477 | - """Iterator yielding items found when traversing self. | ||
| 477 | + """Iterator yielding items found when traversing `self`. | ||
| 478 | 478 | ||
| 479 | 479 | :param predicate: | |
| 480 | 480 | A function ``f(i,d)`` that returns ``False`` if item i at depth ``d`` should | |
@@ -485,9 +485,10 @@ def _traverse( | |||
| 485 | 485 | item ``i`` at depth ``d``. Item ``i`` will not be returned. | |
| 486 | 486 | ||
| 487 | 487 | :param depth: | |
| 488 | - Defines at which level the iteration should not go deeper if -1, there is no | ||
| 489 | - limit if 0, you would effectively only get self, the root of the iteration | ||
| 490 | - i.e. if 1, you would only get the first level of predecessors/successors. | ||
| 488 | + Defines at which level the iteration should not go deeper if -1. There is no | ||
| 489 | + limit if 0, you would effectively only get `self`, the root of the | ||
| 490 | + iteration. If 1, you would only get the first level of | ||
| 491 | + predecessors/successors. | ||
| 491 | 492 | ||
| 492 | 493 | :param branch_first: | |
| 493 | 494 | If ``True``, items will be returned branch first, otherwise depth first. | |
@@ -497,8 +498,8 @@ def _traverse( | |||
| 497 | 498 | encountered several times. Loops are prevented that way. | |
| 498 | 499 | ||
| 499 | 500 | :param ignore_self: | |
| 500 | - If ``True``, self will be ignored and automatically pruned from the result. | ||
| 501 | - Otherwise it will be the first item to be returned. If `as_edge` is | ||
| 501 | + If ``True``, `self` will be ignored and automatically pruned from the | ||
| 502 | + result. Otherwise it will be the first item to be returned. If `as_edge` is | ||
| 502 | 503 | ``True``, the source of the first edge is ``None``. | |
| 503 | 504 | ||
| 504 | 505 | :param as_edge: | |
@@ -507,7 +508,7 @@ def _traverse( | |||
| 507 | 508 | destination. | |
| 508 | 509 | ||
| 509 | 510 | :return: | |
| 510 | - Iterator yielding items found when traversing self:: | ||
| 511 | + Iterator yielding items found when traversing `self`:: | ||
| 511 | 512 | ||
| 512 | 513 | Commit -> Iterator[Union[Commit, Tuple[Commit, Commit]] Submodule -> | |
| 513 | 514 | Iterator[Submodule, Tuple[Submodule, Submodule]] Tree -> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments