diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index 6ce39bf3..90199529 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -234,7 +234,7 @@ class Themerr(Agent.Movies): defined in the `Locale `_ API. - primary_provider : bool + primary_provider : py:class:`bool` A boolean value defining whether the agent is a primary metadata provider or not. Primary providers can be selected as the main source of metadata for a particular media type. If an agent is secondary (``primary_provider`` is set to ``False``) it will only be able to contribute to data provided by another @@ -291,7 +291,7 @@ def search(results, media, lang, manual): lang : str A string identifying the user’s currently selected language. This will be one of the constants added to the agent’s ``languages`` attribute. - manual : bool + manual : py:class:`bool` A boolean value identifying whether the search was issued automatically during scanning, or manually by the user (in order to fix an incorrect match). @@ -359,7 +359,7 @@ def update(metadata, media, lang, force): lang : str A string identifying which language should be used for the metadata. This will be one of the constants defined in the agent’s ``languages`` attribute. - force : bool + force : py:class:`bool` A boolean value identifying whether the user forced a full refresh of the metadata. If this argument is ``True``, all metadata should be refreshed, regardless of whether it has been populated previously. diff --git a/Contents/Code/general_helper.py b/Contents/Code/general_helper.py index 615d5fd1..2d01d011 100644 --- a/Contents/Code/general_helper.py +++ b/Contents/Code/general_helper.py @@ -169,7 +169,7 @@ def remove_uploaded_media(item, media_type): Returns ------- - bool + py:class:`bool` True if the themes were removed successfully, False otherwise. Examples diff --git a/Contents/Code/migration_helper.py b/Contents/Code/migration_helper.py index 20d1701a..bcb7e43c 100644 --- a/Contents/Code/migration_helper.py +++ b/Contents/Code/migration_helper.py @@ -70,12 +70,12 @@ def _validate_migration_key(self, key, raise_exception=False): ---------- key : str The key to validate. - raise_exception : bool + raise_exception : py:class:`bool` Whether to raise an exception if the key is invalid. Returns ------- - bool + py:class:`bool` Whether the key is valid. Raises @@ -120,7 +120,7 @@ def get_migration_status(self, key): Returns ------- - Optional[bool] + Optional[py:class:`bool`] The migration status for the given key, or None if the key is not found. Examples diff --git a/Contents/Code/plex_api_helper.py b/Contents/Code/plex_api_helper.py index caecb1f6..a493f6de 100644 --- a/Contents/Code/plex_api_helper.py +++ b/Contents/Code/plex_api_helper.py @@ -107,7 +107,7 @@ def update_plex_item(rating_key): Returns ------- - bool + py:class:`bool` True if the item was updated successfully, False otherwise. Examples @@ -249,7 +249,7 @@ def add_media(item, media_type, media_url_id, media_file=None, media_url=None): Returns ------- - bool + py:class:`bool` True if the media was added successfully or already present, False otherwise. Examples @@ -331,12 +331,12 @@ def change_lock_status(item, field, lock=False): The Plex item to unlock the field for. field : str The field to unlock. - lock : bool + lock : py:class:`bool` True to lock the field, False to unlock the field. Returns ------- - bool + py:class:`bool` True if the lock status matches the requested lock status, False otherwise. Examples @@ -402,7 +402,7 @@ def upload_media(item, method, filepath=None, url=None): Returns ------- - bool + py:class:`bool` True if the theme was uploaded successfully, False otherwise. Examples diff --git a/Contents/Code/scheduled_tasks.py b/Contents/Code/scheduled_tasks.py index 9a1f66f4..6f8912c5 100644 --- a/Contents/Code/scheduled_tasks.py +++ b/Contents/Code/scheduled_tasks.py @@ -48,7 +48,7 @@ def run_threaded(target, daemon=None, args=(), **kwargs): ---------- target : Callable The function to run in a thread. - daemon : Optional[bool] + daemon : Optional[py:class:`bool`] Whether the thread should be a daemon thread. args : Iterable The positional arguments to pass to the function. diff --git a/Contents/Code/themerr_db_helper.py b/Contents/Code/themerr_db_helper.py index 2a3b2ad5..46822e63 100644 --- a/Contents/Code/themerr_db_helper.py +++ b/Contents/Code/themerr_db_helper.py @@ -102,7 +102,7 @@ def item_exists(database_type, database, id): Returns ------- - bool + py:class:`bool` True if the item exists in the ThemerrDB, otherwise False. Examples diff --git a/Contents/Code/webapp.py b/Contents/Code/webapp.py index c5eb0473..b551f690 100644 --- a/Contents/Code/webapp.py +++ b/Contents/Code/webapp.py @@ -142,7 +142,7 @@ def start_server(): Returns ------- - bool + py:class:`bool` True if the server is running, otherwise False. Examples @@ -179,7 +179,7 @@ def stop_server(): Returns ------- - bool + py:class:`bool` True if the server was shutdown, otherwise False. Examples diff --git a/Contents/Code/youtube_dl_helper.py b/Contents/Code/youtube_dl_helper.py index 1aaedd62..6d8cdea9 100644 --- a/Contents/Code/youtube_dl_helper.py +++ b/Contents/Code/youtube_dl_helper.py @@ -31,7 +31,7 @@ def nsbool(value): Parameters ---------- - value : bool + value : py:class:`bool` The boolean value to format. Returns diff --git a/docs/source/conf.py b/docs/source/conf.py index eec7f858..82ab3873 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -50,6 +50,7 @@ 'numpydoc', # this automatically loads `sphinx.ext.autosummary` as well 'sphinx.ext.autodoc', # autodocument modules 'sphinx.ext.autosectionlabel', + 'sphinx.ext.intersphinx', # link to other projects' documentation 'sphinx.ext.todo', # enable to-do sections 'sphinx.ext.viewcode', # add links to view source code ] @@ -120,3 +121,14 @@ # disable epub mimetype warnings # https://github.com/readthedocs/readthedocs.org/blob/eadf6ac6dc6abc760a91e1cb147cc3c5f37d1ea8/docs/conf.py#L235-L236 suppress_warnings = ["epub.unknown_project_files"] + +python_version = '{}.{}'.format(sys.version_info.major, sys.version_info.minor) + +intersphinx_mapping = { + 'python': ('https://docs.python.org/{}/'.format(python_version), None), + 'plexapi': ('https://docs.lizardbyte.dev/projects/python-plexapi-backport/en/latest/', None), +} + +numpydoc_show_class_members = True +numpydoc_show_inherited_class_members = False +numpydoc_xref_param_type = True