Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Commit6626117

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 parent8543457 commit6626117

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

‎git/objects/commit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,8 @@ def trailers(self) -> Dict[str, str]:
404404
deftrailers_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 toRFC822 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-mailheaders. 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
deftrailers_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 toRFC822 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-mailheaders. 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

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp