@@ -186,6 +186,8 @@ class PluginDescription:
186186 :param parameters: Available plugin parameters
187187 :param icon: An optional custom plugin icon.
188188 :param actions: Custom plugin actions.
189+ :param deprecation: Optional deprecation message.
190+ If set, the plugin will be marked as deprecated in the UI.
189191 """
190192
191193 def __init__ ( # noqa: PLR0913
@@ -199,6 +201,7 @@ def __init__( # noqa: PLR0913
199201 parameters : list [PluginParameter ] | None = None ,
200202 icon : Icon | None = None ,
201203 actions : list [PluginAction ] | None = None ,
204+ deprecation : str | None = None ,
202205 ) -> None :
203206 # Set the type of the plugin. Same as the class name of the plugin
204207 # base class, e.g., 'WorkflowPlugin'.
@@ -238,6 +241,7 @@ def __init__( # noqa: PLR0913
238241 self .actions = []
239242 else :
240243 self .actions = actions
244+ self .deprecation = deprecation
241245 for action in self .actions :
242246 action .validate (plugin_class )
243247
@@ -321,6 +325,8 @@ class Plugin:
321325 :param parameters: Available plugin parameters.
322326 :param icon: Optional custom plugin icon.
323327 :param actions: Custom plugin actions
328+ :param deprecation: Optional deprecation message.
329+ If set, the plugin will be marked as deprecated in the UI.
324330 """
325331
326332 plugins : ClassVar [list [PluginDescription ]] = []
@@ -335,13 +341,15 @@ def __init__( # noqa: PLR0913
335341 parameters : list [PluginParameter ] | None = None ,
336342 icon : Icon | None = None ,
337343 actions : list [PluginAction ] | None = None ,
344+ deprecation : str | None = None ,
338345 ):
339346 self .label = label
340347 self .description = description
341348 self .documentation = documentation
342349 self .plugin_id = plugin_id
343350 self .icon = icon
344351 self .actions = actions
352+ self .deprecation = deprecation
345353 if categories is None :
346354 self .categories = []
347355 else :
@@ -363,6 +371,7 @@ def __call__(self, func: type):
363371 parameters = self .retrieve_parameters (func ),
364372 icon = self .icon ,
365373 actions = self .actions ,
374+ deprecation = self .deprecation ,
366375 )
367376 Plugin .plugins .append (plugin_desc )
368377 return func
0 commit comments