Improve docstrings about tags · gitpython-developers/GitPython@6126997 (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -3,7 +3,11 @@
3 3 # This module is part of GitPython and is released under the
4 4 # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
5 5
6 -"""Object-based types."""
6 +"""Provides an :class:`git.objects.base.Object`-based type for annotated tags.
7 +
8 +This defines the :class:`TagReference` class, which represents annotated tags.
9 +For lightweight tags, see the :mod:`git.refs.tag` module.
10 +"""
7 11
8 12 from . import base
9 13 from .util import get_object_type_by_name, parse_actor_and_date
@@ -25,8 +29,8 @@
25 29
26 30
27 31 class TagObject(base.Object):
28 -"""Non-lightweight tag carrying additional information about an object we are
29 - pointing to."""
32 +"""Annotated (i.e. non-lightweight) tag carrying additional information about an
33 + object we are pointing to."""
30 34
31 35 type: Literal["tag"] = "tag"
32 36
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
1 1 # This module is part of GitPython and is released under the
2 2 # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
3 3
4 +"""Provides a :class:`~git.refs.reference.Reference`-based type for lightweight tags.
5 +
6 +This defines the :class:`TagReference` class (and its alias :class:`Tag`), which
7 +represents lightweight tags. For annotated tags (which are git objects), see the
8 +:mod:`git.objects.tag` module.
9 +"""
10 +
4 11 from .reference import Reference
5 12
6 13 __all__ = ["TagReference", "Tag"]