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 f43292e

Browse filesBrowse files
committed
Somewhat improve _get_ref_info{,_helper} docstrings
+ Add a missing :class: reference in _get_commit docstring.
1 parent 63983c2 commit f43292e
Copy full SHA for f43292e

File tree

1 file changed

+10
-9
lines changed
Filter options

1 file changed

+10
-9
lines changed

‎git/refs/symbolic.py

Copy file name to clipboardExpand all lines: git/refs/symbolic.py
+10-9Lines 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
if ref_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
return cls._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 be dereferenced recursively.
296297
"""
297298
obj = self._get_object()
298299
if obj.type == "tag":

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.