Skip to content

Commit

Permalink
Make BaseObject the parent class for Date, StyledText and StyledTextTag
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Hall committed Oct 19, 2024
1 parent e84b26d commit ddf7d2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gramps/gen/lib/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# Gramps modules
#
# ------------------------------------------------------------------------
from .baseobj import BaseObject
from ..config import config
from ..const import GRAMPS_LOCALE as glocale
from ..errors import DateError
Expand Down Expand Up @@ -563,7 +564,7 @@ def _diff(self, date1, date2):
# Date
#
# -------------------------------------------------------------------------
class Date:
class Date(BaseObject):
"""
The core date handling class for Gramps.
Expand Down
3 changes: 2 additions & 1 deletion gramps/gen/lib/styledtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#
# -------------------------------------------------------------------------
from ..const import GRAMPS_LOCALE as glocale
from .baseobj import BaseObject
from .styledtexttag import StyledTextTag

_ = glocale.translation.gettext
Expand All @@ -45,7 +46,7 @@
# StyledText
#
# -------------------------------------------------------------------------
class StyledText:
class StyledText(BaseObject):
"""Helper class to enable character based text formatting.
:py:class:`StyledText` is a wrapper class binding the clear text string and
Expand Down
3 changes: 2 additions & 1 deletion gramps/gen/lib/styledtexttag.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#
# -------------------------------------------------------------------------
from ..const import GRAMPS_LOCALE as glocale
from .baseobj import BaseObject
from .styledtexttagtype import StyledTextTagType

_ = glocale.translation.gettext
Expand All @@ -38,7 +39,7 @@
# StyledTextTag
#
# -------------------------------------------------------------------------
class StyledTextTag:
class StyledTextTag(BaseObject):
"""Hold formatting information for :py:class:`.StyledText`.
:py:class:`StyledTextTag` is a container class, it's attributes are
Expand Down

0 comments on commit ddf7d2e

Please sign in to comment.