Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Commit

Permalink
docs: add intersphinx extension (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Jan 22, 2024
1 parent 94e5193 commit 6baa0a7
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 17 deletions.
6 changes: 3 additions & 3 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class Themerr(Agent.Movies):
defined in the `Locale
<https://web.archive.org/web/https://dev.plexapp.com/docs/api/localekit.html#module-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
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Contents/Code/general_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Contents/Code/migration_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Contents/Code/plex_api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Contents/Code/scheduled_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Contents/Code/themerr_db_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Contents/Code/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def start_server():
Returns
-------
bool
py:class:`bool`
True if the server is running, otherwise False.
Examples
Expand Down Expand Up @@ -179,7 +179,7 @@ def stop_server():
Returns
-------
bool
py:class:`bool`
True if the server was shutdown, otherwise False.
Examples
Expand Down
2 changes: 1 addition & 1 deletion Contents/Code/youtube_dl_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def nsbool(value):
Parameters
----------
value : bool
value : py:class:`bool`
The boolean value to format.
Returns
Expand Down
12 changes: 12 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
Expand Down Expand Up @@ -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

0 comments on commit 6baa0a7

Please sign in to comment.