@@ -63,7 +63,7 @@ class SymbolicReference:
6363 This does not point to a specific commit, but to another
6464 :class:`~git.refs.head.Head`, which itself specifies a commit.
6565
66- A typical example for a symbolic reference is `` HEAD` `.
66+ A typical example for a symbolic reference is :class:`~git.refs.head. HEAD`.
6767 """
6868
6969 __slots__ = ("repo" , "path" )
@@ -115,8 +115,8 @@ def _get_packed_refs_path(cls, repo: "Repo") -> str:
115115
116116 @classmethod
117117 def _iter_packed_refs (cls , repo : "Repo" ) -> Iterator [Tuple [str , str ]]:
118- """Return an iterator yielding pairs of sha1/path pairs (as strings)
119- for the corresponding refs.
118+ """Return an iterator yielding pairs of sha1/path pairs (as strings) for the
119+ corresponding refs.
120120
121121 :note:
122122 The packed refs file will be kept open as long as we iterate.
@@ -226,9 +226,9 @@ def _get_ref_info_helper(
226226 """
227227 :return:
228228 (str(sha), str(target_ref_path)) if available, the sha the file at rela_path
229- points to, or None.
229+ points to, or `` None`` .
230230
231- target_ref_path is the reference we point to, 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 )
@@ -273,7 +273,7 @@ def _get_ref_info(cls, repo: "Repo", ref_path: Union[PathLike, None]) -> Union[T
273273 :return: (str(sha), str(target_ref_path)) if available, the sha the file at
274274 rela_path points to, or None.
275275
276- target_ref_path is the reference we point to, or None.
276+ target_ref_path is the reference we point to, or `` None`` .
277277 """
278278 return cls ._get_ref_info_helper (repo , ref_path )
279279
@@ -313,7 +313,7 @@ def set_commit(
313313 :class:`~git.objects.commit.Commit`.
314314
315315 :raise ValueError:
316- If `commit` is not a :class:`~git.objects.commit.Commit` object or doesn't
316+ If `commit` is not a :class:`~git.objects.commit.Commit` object, nor does it
317317 point to a commit.
318318
319319 :return:
@@ -357,7 +357,7 @@ def set_object(
357357 to.
358358
359359 :param logmsg:
360- If not None, the message will be used in the reflog entry to be written.
360+ If not `` None`` , the message will be used in the reflog entry to be written.
361361 Otherwise the reflog is not altered.
362362
363363 :note:
@@ -491,8 +491,8 @@ def set_reference(
491491 def is_valid (self ) -> bool :
492492 """
493493 :return:
494- True if the reference is valid, hence it can be read and points to a valid
495- object or reference.
494+ `` True`` if the reference is valid, hence it can be read and points to a
495+ valid object or reference.
496496 """
497497 try :
498498 self .object
@@ -505,7 +505,7 @@ def is_valid(self) -> bool:
505505 def is_detached (self ) -> bool :
506506 """
507507 :return:
508- True if we are a detached reference, hence we point to a specific commit
508+ `` True`` if we are a detached reference, hence we point to a specific commit
509509 instead to another reference.
510510 """
511511 try :
@@ -565,7 +565,7 @@ def log_append(
565565 def log_entry (self , index : int ) -> "RefLogEntry" :
566566 """
567567 :return:
568- RefLogEntry at the given index
568+ :class:`~git.refs.log. RefLogEntry` at the given index
569569
570570 :param index:
571571 Python list compatible positive or negative index.
@@ -582,7 +582,7 @@ def to_full_path(cls, path: Union[PathLike, "SymbolicReference"]) -> PathLike:
582582 """
583583 :return:
584584 String with a full repository-relative path which can be used to initialize
585- a Reference instance, for instance by using
585+ a :class:`~git.refs.reference. Reference` instance, for instance by using
586586 :meth:`Reference.from_path <git.refs.reference.Reference.from_path>`.
587587 """
588588 if isinstance (path , SymbolicReference ):
@@ -666,7 +666,7 @@ def _create(
666666 ) -> T_References :
667667 """Internal method used to create a new symbolic reference.
668668
669- If `resolve` is False, the reference will be taken as is, creating a proper
669+ If `resolve` is `` False`` , the reference will be taken as is, creating a proper
670670 symbolic reference. Otherwise it will be resolved to the corresponding object
671671 and a detached symbolic reference will be created instead.
672672 """
@@ -722,12 +722,12 @@ def create(
722722 If it is a commit-ish, the symbolic ref will be detached.
723723
724724 :param force:
725- If True, force creation even if a symbolic reference with that name already
726- exists. Raise :class:`OSError` otherwise.
725+ If `` True`` , force creation even if a symbolic reference with that name
726+ already exists. Raise :class:`OSError` otherwise.
727727
728728 :param logmsg:
729- If not None, the message to append to the reflog.
730- If None, no reflog entry is written.
729+ If not `` None`` , the message to append to the reflog.
730+ If `` None`` , no reflog entry is written.
731731
732732 :return:
733733 Newly created symbolic reference
@@ -751,8 +751,8 @@ def rename(self, new_path: PathLike, force: bool = False) -> "SymbolicReference"
751751 In case this is a symbolic ref, there is no implied prefix.
752752
753753 :param force:
754- If True, the rename will succeed even if a head with the target name already
755- exists. It will be overwritten in that case.
754+ If `` True`` , the rename will succeed even if a head with the target name
755+ already exists. It will be overwritten in that case.
756756
757757 :return:
758758 self
@@ -847,8 +847,8 @@ def iter_items(
847847 :param common_path:
848848 Optional keyword argument to the path which is to be shared by all returned
849849 Ref objects.
850- Defaults to class specific portion if None, ensuring that only refs suitable
851- for the actual class are returned.
850+ Defaults to class specific portion if `` None`` , ensuring that only refs
851+ suitable for the actual class are returned.
852852
853853 :return:
854854 A list of :class:`SymbolicReference`, each guaranteed to be a symbolic ref
0 commit comments