Skip to content

Commit 6626117

Browse files
committed
Fix parse_date docstring spacing; use RFC role
There are only a three cases where a specific RFC is mentioned. Only one is in parse_date and the others are elsewhere.
1 parent 8543457 commit 6626117

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Diff for: git/objects/commit.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,8 @@ def trailers(self) -> Dict[str, str]:
404404
def trailers_list(self) -> List[Tuple[str, str]]:
405405
"""Get the trailers of the message as a list.
406406
407-
Git messages can contain trailer information that are similar to RFC 822 e-mail
408-
headers. See :manpage:`git-interpret-trailers(1)`.
407+
Git messages can contain trailer information that are similar to :rfc:`822`
408+
e-mail headers. See :manpage:`git-interpret-trailers(1)`.
409409
410410
This function calls ``git interpret-trailers --parse`` onto the message to
411411
extract the trailer information, returns the raw trailer data as a list.
@@ -456,8 +456,8 @@ def trailers_list(self) -> List[Tuple[str, str]]:
456456
def trailers_dict(self) -> Dict[str, List[str]]:
457457
"""Get the trailers of the message as a dictionary.
458458
459-
Git messages can contain trailer information that are similar to RFC 822 e-mail
460-
headers. See :manpage:`git-interpret-trailers(1)`.
459+
Git messages can contain trailer information that are similar to :rfc:`822`
460+
e-mail headers. See :manpage:`git-interpret-trailers(1)`.
461461
462462
This function calls ``git interpret-trailers --parse`` onto the message to
463463
extract the trailer information. The key value pairs are stripped of leading and

Diff for: git/objects/util.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,8 @@ def parse_date(string_date: Union[str, datetime]) -> Tuple[int, int]:
223223
224224
* Aware datetime instance
225225
* Git internal format: timestamp offset
226-
* RFC 2822: ``Thu, 07 Apr 2005 22:13:13 +0200``
227-
* ISO 8601: ``2005-04-07T22:13:13``
228-
The T can be a space as well.
226+
* :rfc:`2822`: ``Thu, 07 Apr 2005 22:13:13 +0200``
227+
* ISO 8601: ``2005-04-07T22:13:13`` - The ``T`` can be a space as well.
229228
230229
:return:
231230
Tuple(int(timestamp_UTC), int(offset)), both in seconds since epoch

0 commit comments

Comments
 (0)