44import typing as t
55from collections .abc import Callable , Sequence
66
7- from mcstatus ._utils import deprecation_warn
87from mcstatus .motd .components import Formatting , MinecraftColor , ParsedMotdComponent , TranslationTag , WebColor
98
109__all__ = [
@@ -143,14 +142,6 @@ def _handle_str(self, element: str, /) -> str:
143142
144143
145144class MinecraftTransformer (PlainTransformer ):
146- def __init__ (self , * , _is_called_directly : bool = True ) -> None :
147- if _is_called_directly :
148- deprecation_warn (
149- obj_name = "MinecraftTransformer (called directly)" ,
150- removal_version = "13.0.0" ,
151- extra_msg = "Transformers are no longer a part of public API" ,
152- )
153-
154145 def _handle_component (self , component : ParsedMotdComponent ) -> tuple [str , str ] | tuple [str ]:
155146 result = super ()._handle_component (component )
156147 if len (result ) == 2 :
@@ -172,15 +163,8 @@ class HtmlTransformer(PlainTransformer):
172163 Formatting .UNDERLINED : "u" ,
173164 }
174165
175- def __init__ (self , * , bedrock : bool = False , _is_called_directly : bool = True ) -> None :
176- if _is_called_directly :
177- # NOTE: don't forget to remove the default value for `bedrock` argument
178- deprecation_warn (
179- obj_name = "HtmlTransformer (called directly)" ,
180- removal_version = "13.0.0" ,
181- extra_msg = "Transformers are no longer a part of public API" ,
182- )
183-
166+ # TODO: When dropping v13 support, make sure to drop the default value for the bedrock arg
167+ def __init__ (self , * , bedrock : bool = False ) -> None :
184168 self .bedrock = bedrock
185169 self .on_reset : list [str ] = []
186170
@@ -235,15 +219,8 @@ class AnsiTransformer(PlainTransformer):
235219 key : foreground for key , (foreground , _background ) in _MINECRAFT_COLOR_TO_RGB_BEDROCK .items ()
236220 }
237221
238- def __init__ (self , * , bedrock : bool = True , _is_called_directly : bool = True ) -> None :
239- if _is_called_directly :
240- # NOTE: don't forget to remove the default value for `bedrock` argument
241- deprecation_warn (
242- obj_name = "AnsiTransformer (called directly)" ,
243- removal_version = "13.0.0" ,
244- extra_msg = "Transformers are no longer a part of public API" ,
245- )
246-
222+ # TODO: When dropping v13 support, make sure to drop the default value for the bedrock arg
223+ def __init__ (self , * , bedrock : bool = True ) -> None :
247224 self .bedrock = bedrock
248225
249226 def ansi_color (self , color : tuple [int , int , int ] | MinecraftColor ) -> str :
0 commit comments