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

Commitf43292e

Browse files
committed
Somewhat improve _get_ref_info{,_helper} docstrings
+ Add a missing :class: reference in _get_commit docstring.
1 parent63983c2 commitf43292e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

‎git/refs/symbolic.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ def _get_ref_info_helper(
225225
)->Union[Tuple[str,None],Tuple[None,str]]:
226226
"""
227227
:return:
228-
(str(sha), str(target_ref_path)) if available, the sha the file at rela_path
229-
points to, or ``None``.
228+
*(str(sha), str(target_ref_path))*, where:
230229
231-
target_ref_path is the reference we point to, or ``None``.
230+
* *sha* is of the file at rela_path points to if available, or ``None``.
231+
* *target_ref_path* is the reference we point to, or ``None``.
232232
"""
233233
ifref_path:
234234
cls._check_ref_name_valid(ref_path)
@@ -270,10 +270,11 @@ def _get_ref_info_helper(
270270
@classmethod
271271
def_get_ref_info(cls,repo:"Repo",ref_path:Union[PathLike,None])->Union[Tuple[str,None],Tuple[None,str]]:
272272
"""
273-
:return: (str(sha), str(target_ref_path)) if available, the sha the file at
274-
rela_path points to, or None.
273+
:return:
274+
*(str(sha), str(target_ref_path))*, where:
275275
276-
target_ref_path is the reference we point to, or ``None``.
276+
* *sha* is of the file at rela_path points to if available, or ``None``.
277+
* *target_ref_path* is the reference we point to, or ``None``.
277278
"""
278279
returncls._get_ref_info_helper(repo,ref_path)
279280

@@ -290,9 +291,9 @@ def _get_object(self) -> Commit_ish:
290291
def_get_commit(self)->"Commit":
291292
"""
292293
:return:
293-
Commit object we point to. This works for detached and non-detached
294-
:class:`SymbolicReference` instances. The symbolic reference will be
295-
dereferenced recursively.
294+
:class:`~git.objects.commit.Commit` object we point to. This works for
295+
detached and non-detached:class:`SymbolicReference` instances. The symbolic
296+
reference will bedereferenced recursively.
296297
"""
297298
obj=self._get_object()
298299
ifobj.type=="tag":

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp