Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6626117

Browse filesBrowse 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
Copy full SHA for 6626117

File tree

2 files changed

+6
-7
lines changed
Filter options

2 files changed

+6
-7
lines changed

‎git/objects/commit.py

Copy file name to clipboardExpand all lines: git/objects/commit.py
+4-4Lines changed: 4 additions & 4 deletions
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

‎git/objects/util.py

Copy file name to clipboardExpand all lines: git/objects/util.py
+2-3Lines changed: 2 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.