Skip to content

Commit

Permalink
plugin: improve priority docstring clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw committed Nov 15, 2023
1 parent 7676a7a commit 1196b19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sopel/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,10 +1015,11 @@ def add_attribute(function):
def priority(value: Literal['low', 'medium', 'high']) -> Callable:
"""Decorate a function to be executed with higher or lower priority.
:param value: one of ``high``, ``medium``, or ``low``; defaults to ``medium``
:param value: one of ``high``, ``medium``, or ``low``
The priority allows you to control the order of callable execution, if your
plugin needs it.
The priority allows you some control over the order of callable execution,
if your plugin needs it. If a callable does not specify its ``priority``,
Sopel assumes ``medium``.
"""
def add_attribute(function):
function.priority = value
Expand Down

0 comments on commit 1196b19

Please sign in to comment.