Fix exception doc strings

This commit is contained in:
JonnyWong16 2021-01-02 16:44:18 -08:00
parent f8c325ce2f
commit eeda5dfd67
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 12 additions and 12 deletions

View file

@ -658,7 +658,7 @@ class LibrarySection(PlexObject):
* year: List of years to search within ([yyyy, ...]). [all]
Raises:
:exc:`~plexapi.exceptions.BadRequest`: when applying unknown filter
:exc:`~plexapi.exceptions.BadRequest`: When applying an unknown filter.
"""
# cleanup the core arguments
args = {}
@ -779,7 +779,7 @@ class LibrarySection(PlexObject):
:class:`~plexapi.sync.SyncItem`: an instance of created syncItem.
Raises:
:exc:`~plexapi.exceptions.BadRequest`: when the library is not allowed to sync
:exc:`~plexapi.exceptions.BadRequest`: When the library is not allowed to sync.
Example:

View file

@ -580,8 +580,8 @@ class MyPlexAccount(PlexObject):
:class:`~plexapi.sync.SyncItem`: an instance of created syncItem.
Raises:
:exc:`~plexapi.exceptions.BadRequest`: when client with provided clientId wasn`t found.
:exc:`~plexapi.exceptions.BadRequest`: provided client doesn`t provides `sync-target`.
:exc:`~plexapi.exceptions.BadRequest`: When client with provided clientId wasn`t found.
:exc:`~plexapi.exceptions.BadRequest`: Provided client doesn`t provides `sync-target`.
"""
if not client and not clientId:
clientId = X_PLEX_IDENTIFIER
@ -1155,8 +1155,8 @@ class MyPlexPinLogin(object):
timeout (int): Timeout in seconds waiting for the PIN login to succeed (optional).
Raises:
:class:`RuntimeError`: if the thread is already running.
:class:`RuntimeError`: if the PIN login for the current PIN has expired.
:class:`RuntimeError`: If the thread is already running.
:class:`RuntimeError`: If the PIN login for the current PIN has expired.
"""
if self._thread and not self._abort:
raise RuntimeError('MyPlexPinLogin thread is already running')

View file

@ -272,8 +272,8 @@ class Playlist(PlexPartialObject, Playable):
generated from metadata of current photo.
Raises:
:exc:`~plexapi.exceptions.BadRequest`: when playlist is not allowed to sync.
:exc:`~plexapi.exceptions.Unsupported`: when playlist content is unsupported.
:exc:`~plexapi.exceptions.BadRequest`: When playlist is not allowed to sync.
:exc:`~plexapi.exceptions.Unsupported`: When playlist content is unsupported.
Returns:
:class:`~plexapi.sync.SyncItem`: an instance of created syncItem.

View file

@ -317,7 +317,7 @@ class PlexServer(PlexObject):
name (str): Name of the client to return.
Raises:
:exc:`~plexapi.exceptions.NotFound`: Unknown client name
:exc:`~plexapi.exceptions.NotFound`: Unknown client name.
"""
for client in self.clients():
if client and client.title == name:
@ -440,7 +440,7 @@ class PlexServer(PlexObject):
title (str): Title of the playlist to return.
Raises:
:exc:`~plexapi.exceptions.NotFound`: Invalid playlist title
:exc:`~plexapi.exceptions.NotFound`: Invalid playlist title.
"""
return self.fetchItem('/playlists', title=title)

View file

@ -201,7 +201,7 @@ class MediaSettings(object):
videoQuality (int): idx of quality of the video, one of VIDEO_QUALITY_* values defined in this module.
Raises:
:exc:`~plexapi.exceptions.BadRequest`: when provided unknown video quality.
:exc:`~plexapi.exceptions.BadRequest`: When provided unknown video quality.
"""
if videoQuality == VIDEO_QUALITY_ORIGINAL:
return MediaSettings('', '', '')
@ -231,7 +231,7 @@ class MediaSettings(object):
module.
Raises:
:exc:`~plexapi.exceptions.BadRequest` when provided unknown video quality.
:exc:`~plexapi.exceptions.BadRequest`: When provided unknown video quality.
"""
if resolution in PHOTO_QUALITIES:
return MediaSettings(photoQuality=PHOTO_QUALITIES[resolution], photoResolution=resolution)