@@ -46,7 +46,7 @@ class DispatchData:
4646 call_ast_ctx : AstEval | None = field (default = None , kw_only = True )
4747 hass_context : Context | None = field (default = None , kw_only = True )
4848
49- # Normally shouldn’ t be used.
49+ # Normally shouldn' t be used.
5050 exception : Exception | None = field (default = None , kw_only = True )
5151 exception_text : str | None = field (default = None , kw_only = True )
5252
@@ -90,7 +90,8 @@ async def validate(self) -> None:
9090 self .kwargs = self .kwargs_schema (self .raw_kwargs )
9191
9292 except vol .Invalid as err :
93- # FIXME For test compatibility. Update the message in the future.
93+ # Keep this wording for transition compatibility. Once the legacy
94+ # subsystem is removed, update the message and related tests.
9495 if len (err .path ) == 1 :
9596 if "extra keys not allowed" in err .msg :
9697 message = f"invalid keyword argument '{ err .path [0 ]} '"
@@ -105,9 +106,11 @@ async def validate(self) -> None:
105106 )
106107 raise type_error from err
107108
109+ @abstractmethod
108110 async def start (self ):
109111 """Start the decorator."""
110112
113+ @abstractmethod
111114 async def stop (self ):
112115 """Stop the decorator."""
113116
@@ -156,7 +159,7 @@ def add(self, decorator: Decorator) -> None:
156159 self ._decorators .append (decorator )
157160 decorator .dm = self
158161
159- def get_decorators [DT ](self , decorator_type : type [DT ] | None = None ) -> list [DT ]: # noqa: D102
162+ def get_decorators [DT ](self , decorator_type : type [DT ] | None = None ) -> list [DT ]:
160163 """Get decorators of a specific type."""
161164 if decorator_type is None :
162165 return self ._decorators .copy ()
@@ -242,7 +245,7 @@ def __init_subclass__(cls, **kwargs):
242245 {vol .Optional ("kwargs" ): vol .Coerce (dict [str , Any ], msg = "should be type dict" )}
243246 )
244247
245- async def dispatch (self , data : DispatchData ):
248+ async def dispatch (self , data : DispatchData ) -> None :
246249 """Dispatch a trigger call to the function."""
247250 if not data .trigger :
248251 data .trigger = self
@@ -260,7 +263,8 @@ async def validate(self) -> None:
260263 await super ().validate ()
261264 decorators = self .dm .get_decorators (TriggerDecorator )
262265 if len (decorators ) == 0 :
263- # FIXME For test compatibility. Update the message in the future.
266+ # Keep this wording for transition compatibility. Once the legacy
267+ # subsystem is removed, update the message and related tests.
264268 trig_decorators_reqd = {
265269 "event_trigger" ,
266270 "mqtt_trigger" ,
0 commit comments