docs: Make extensiondev example and API docs for validate_environment() match
(cherry picked from commit 31c874b3eb)
This commit is contained in:
parent
fe63e425d5
commit
c9b0101e76
@ -52,7 +52,7 @@ class Extension(object):
|
|||||||
return schema
|
return schema
|
||||||
|
|
||||||
def get_command(self):
|
def get_command(self):
|
||||||
"""Command to expose to command line users running mopidy.
|
"""Command to expose to command line users running ``mopidy``.
|
||||||
|
|
||||||
:returns:
|
:returns:
|
||||||
Instance of a :class:`~mopidy.commands.Command` class.
|
Instance of a :class:`~mopidy.commands.Command` class.
|
||||||
@ -60,12 +60,13 @@ class Extension(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def validate_environment(self):
|
def validate_environment(self):
|
||||||
"""Checks if the extension can run in the current environment
|
"""Checks if the extension can run in the current environment.
|
||||||
|
|
||||||
For example, this method can be used to check if all dependencies that
|
Dependencies described by :file:`setup.py` are checked by Mopidy, so
|
||||||
are needed are installed. If a problem is found, raise
|
you should not check their presence here.
|
||||||
:exc:`~mopidy.exceptions.ExtensionError` with a message explaining the
|
|
||||||
issue.
|
If a problem is found, raise :exc:`~mopidy.exceptions.ExtensionError`
|
||||||
|
with a message explaining the issue.
|
||||||
|
|
||||||
:raises: :exc:`~mopidy.exceptions.ExtensionError`
|
:raises: :exc:`~mopidy.exceptions.ExtensionError`
|
||||||
:returns: :class:`None`
|
:returns: :class:`None`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user