Skip to content

Commit 110706e

Browse files
committed
Fix param name in TagRefernece docstring and add info
The "reference" parameter was listed as "ref" in the docstring. This fixes that, slightly expands its description, and also adds documentation for the "repo" parameter.
1 parent 6126997 commit 110706e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎git/refs/tag.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def commit(self) -> "Commit": # type: ignore[override] # LazyMixin has unrelat
7272
def tag(self) -> Union["TagObject", None]:
7373
"""
7474
:return:
75-
Tag object this tag ref points to or None in case we are a lightweight tag
75+
Tag object this tag ref points to, or ``None`` in case we are a lightweight
76+
tag
7677
"""
7778
obj = self.object
7879
if obj.type == "tag":
@@ -96,13 +97,17 @@ def create(
9697
) -> "TagReference":
9798
"""Create a new tag reference.
9899
100+
:param repo:
101+
The :class:`~git.repo.base.Repo` to create the tag in.
102+
99103
:param path:
100104
The name of the tag, e.g. ``1.0`` or ``releases/1.0``.
101105
The prefix ``refs/tags`` is implied.
102106
103-
:param ref:
107+
:param reference:
104108
A reference to the :class:`~git.objects.base.Object` you want to tag.
105-
The Object can be a commit, tree or blob.
109+
The referenced object can be a :class:`~git.objects.commit.Commit`,
110+
:class:`~git.objects.tree.Tree`, or :class:`~git.objects.blob.Blob`.
106111
107112
:param logmsg:
108113
If not None, the message will be used in your tag object. This will also

0 commit comments

Comments
 (0)