@@ -108,20 +108,20 @@ def __init__(
108
108
encoding : Union [str , None ] = None ,
109
109
gpgsig : Union [str , None ] = None ,
110
110
) -> None :
111
- R"""Instantiate a new :class:`Commit`. All keyword arguments taking None as
111
+ R"""Instantiate a new :class:`Commit`. All keyword arguments taking `` None`` as
112
112
default will be implicitly set on first query.
113
113
114
114
:param binsha:
115
- 20 byte sha1
115
+ 20 byte sha1.
116
116
117
117
:param parents: tuple(Commit, ...)
118
118
A tuple of commit ids or actual :class:`Commit`\s.
119
119
120
120
:param tree:
121
121
A :class:`~git.objects.tree.Tree` object.
122
122
123
- :param author: :class:`~git.util.Actor`
124
- The author Actor object
123
+ :param author:
124
+ The author :class:`~git.util. Actor` object.
125
125
126
126
:param authored_date: int_seconds_since_epoch
127
127
The authored DateTime - use :func:`time.gmtime` to convert it into a
@@ -130,8 +130,8 @@ def __init__(
130
130
:param author_tz_offset: int_seconds_west_of_utc
131
131
The timezone that the `authored_date` is in.
132
132
133
- :param committer: :class:`~git.util.Actor`
134
- The committer string.
133
+ :param committer:
134
+ The committer string, as an :class:`~git.util.Actor` object .
135
135
136
136
:param committed_date: int_seconds_since_epoch
137
137
The committed DateTime - use :func:`time.gmtime` to convert it into a
@@ -209,7 +209,7 @@ def _calculate_sha_(cls, repo: "Repo", commit: "Commit") -> bytes:
209
209
return istream .binsha
210
210
211
211
def replace (self , ** kwargs : Any ) -> "Commit" :
212
- """Create new commit object from existing commit object.
212
+ """Create new commit object from an existing commit object.
213
213
214
214
Any values provided as keyword arguments will replace the corresponding
215
215
attribute in the new object.
@@ -295,7 +295,7 @@ def iter_items(
295
295
R"""Find all commits matching the given criteria.
296
296
297
297
:param repo:
298
- The Repo
298
+ The :class:`~git.repo.base. Repo`.
299
299
300
300
:param rev:
301
301
Revision specifier, see git-rev-parse for viable options.
@@ -378,7 +378,7 @@ def stats(self) -> Stats:
378
378
379
379
@property
380
380
def trailers (self ) -> Dict [str , str ]:
381
- """Get the trailers of the message as a dictionary
381
+ """Deprecated. Get the trailers of the message as a dictionary.
382
382
383
383
:note: This property is deprecated, please use either :attr:`trailers_list` or
384
384
:attr:`trailers_dict``.
@@ -396,7 +396,7 @@ def trailers_list(self) -> List[Tuple[str, str]]:
396
396
Git messages can contain trailer information that are similar to RFC 822 e-mail
397
397
headers (see: https://git-scm.com/docs/git-interpret-trailers).
398
398
399
- This functions calls ``git interpret-trailers --parse`` onto the message to
399
+ This function calls ``git interpret-trailers --parse`` onto the message to
400
400
extract the trailer information, returns the raw trailer data as a list.
401
401
402
402
Valid message with trailer::
@@ -444,7 +444,7 @@ def trailers_dict(self) -> Dict[str, List[str]]:
444
444
Git messages can contain trailer information that are similar to RFC 822 e-mail
445
445
headers (see: https://git-scm.com/docs/git-interpret-trailers).
446
446
447
- This functions calls ``git interpret-trailers --parse`` onto the message to
447
+ This function calls ``git interpret-trailers --parse`` onto the message to
448
448
extract the trailer information. The key value pairs are stripped of leading and
449
449
trailing whitespaces before they get saved into a dictionary.
450
450
@@ -481,7 +481,7 @@ def trailers_dict(self) -> Dict[str, List[str]]:
481
481
def _iter_from_process_or_stream (cls , repo : "Repo" , proc_or_stream : Union [Popen , IO ]) -> Iterator ["Commit" ]:
482
482
"""Parse out commit information into a list of :class:`Commit` objects.
483
483
484
- We expect one- line per commit, and parse the actual commit information directly
484
+ We expect one line per commit, and parse the actual commit information directly
485
485
from our lighting fast object database.
486
486
487
487
:param proc:
@@ -555,11 +555,11 @@ def create_from_tree(
555
555
:param parent_commits:
556
556
Optional :class:`Commit` objects to use as parents for the new commit. If
557
557
empty list, the commit will have no parents at all and become a root commit.
558
- If None, the current head commit will be the parent of the new commit
558
+ If `` None`` , the current head commit will be the parent of the new commit
559
559
object.
560
560
561
561
:param head:
562
- If True, the HEAD will be advanced to the new commit automatically.
562
+ If `` True`` , the HEAD will be advanced to the new commit automatically.
563
563
Otherwise the HEAD will remain pointing on the previous commit. This could
564
564
lead to undesired results when diffing files.
565
565
0 commit comments