From 41b6a99fe89d0165a179e67e80291961c89093d0 Mon Sep 17 00:00:00 2001 From: fl0w Date: Wed, 2 Mar 2022 01:41:05 -0500 Subject: [PATCH] revert: remove Format class. --- interactions/api/models/misc.py | 50 --------------------------------- 1 file changed, 50 deletions(-) diff --git a/interactions/api/models/misc.py b/interactions/api/models/misc.py index 64d3311f1..3bc0e83c3 100644 --- a/interactions/api/models/misc.py +++ b/interactions/api/models/misc.py @@ -171,56 +171,6 @@ def __hash__(self): # but end users might. -class Format: - """ - This object is used to respectively format markdown strings - provided by the WYSIWYG text editor for ease-of-accessibility - and simple implementations into bots. - - .. note:: - All base strings are given brackets before being f-string - parsable to make conversion simplified. - - .. warning:: - the ``stylize()`` method must be used if you're actually - looking to give a **str** specific result. - """ - - USER = "<@%s>" - USER_NICK = "<@!%s>" - CHANNEL = "<#%s>" - ROLE = "<@&%s>" - EMOJI = "<:%s:%d>" - EMOJI_ANIMATED = "" - TIMESTAMP = "" - TIMESTAMP_SHORT_T = "" - TIMESTAMP_LONG_T = "" - TIMESTAMP_SHORT_D = "" - TIMESTAMP_LONG_D = "" - TIMESTAMP_SHORT_DT = TIMESTAMP - TIMESTAMP_LONG_DT = "" - TIMESTAMP_RELATIVE = "" - - @classmethod - def stylize(cls, format: str, **kwargs) -> str: - r""" - This takes a format style from the object and - converts it into a usable string for ease. - - :param format: The format string to use. - :type format: str - :param \**kwargs: Multiple key-word arguments to use, where key=value is format=value. - :type \**kwargs: dict - :return: The formatted string. - :rtype: str - """ - new: str = f"" # noqa: F541 - for kwarg in kwargs: - if format == kwarg: - new %= format - return new - - class MISSING: """A pseudosentinel based from an empty object. This does violate PEP, but, I don't care."""