From d226db90397d5a021eaefe9fba07268356b54112 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Tue, 20 Nov 2012 08:49:55 +0100 Subject: [PATCH] docs: Fix docstring errors --- mopidy/core/playback.py | 4 +++- mopidy/core/tracklist.py | 20 +++++++------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/mopidy/core/playback.py b/mopidy/core/playback.py index 94b4af9c..0cd2b3e8 100644 --- a/mopidy/core/playback.py +++ b/mopidy/core/playback.py @@ -324,6 +324,8 @@ class PlaybackController(object): def on_end_of_track(self): """ Tell the playback controller that end of track is reached. + + Used by event handler in :class:`mopidy.core.Core`. """ if self.state == PlaybackState.STOPPED: return @@ -343,7 +345,7 @@ class PlaybackController(object): """ Tell the playback controller that the current playlist has changed. - Used by :class:`mopidy.core.CurrentPlaylistController`. + Used by :class:`mopidy.core.TracklistController`. """ self._first_shuffle = True self._shuffled = [] diff --git a/mopidy/core/tracklist.py b/mopidy/core/tracklist.py index e00a42f9..fb84c112 100644 --- a/mopidy/core/tracklist.py +++ b/mopidy/core/tracklist.py @@ -63,8 +63,7 @@ class TracklistController(object): """ Add the track to the end of, or at the given position in the tracklist. - Triggers the :method:`mopidy.core.CoreListener.tracklist_changed` - event. + Triggers the :meth:`mopidy.core.CoreListener.tracklist_changed` event. :param track: track to add :type track: :class:`mopidy.models.Track` @@ -90,12 +89,11 @@ class TracklistController(object): """ Append the given tracks to the tracklist. - Triggers the :method:`mopidy.core.CoreListener.tracklist_changed` - event. + Triggers the :meth:`mopidy.core.CoreListener.tracklist_changed` event. :param tracks: tracks to append :type tracks: list of :class:`mopidy.models.Track` - :rtype: list of class:`mopidy.models.TlTrack` + :rtype: list of :class:`mopidy.models.TlTrack` """ tl_tracks = [] for track in tracks: @@ -110,8 +108,7 @@ class TracklistController(object): """ Clear the tracklist. - Triggers the :method:`mopidy.core.CoreListener.tracklist_changed` - event. + Triggers the :meth:`mopidy.core.CoreListener.tracklist_changed` event. """ self._tl_tracks = [] self.version += 1 @@ -156,8 +153,7 @@ class TracklistController(object): """ Move the tracks in the slice ``[start:end]`` to ``to_position``. - Triggers the :method:`mopidy.core.CoreListener.tracklist_changed` - event. + Triggers the :meth:`mopidy.core.CoreListener.tracklist_changed` event. :param start: position of first track to move :type start: int @@ -192,8 +188,7 @@ class TracklistController(object): Uses :meth:`filter()` to lookup the tracks to remove. - Triggers the :method:`mopidy.core.CoreListener.tracklist_changed` - event. + Triggers the :meth:`mopidy.core.CoreListener.tracklist_changed` event. :param criteria: on or more criteria to match by :type criteria: dict @@ -211,8 +206,7 @@ class TracklistController(object): Shuffles the entire tracklist. If ``start`` and ``end`` is given only shuffles the slice ``[start:end]``. - Triggers the :method:`mopidy.core.CoreListener.tracklist_changed` - event. + Triggers the :meth:`mopidy.core.CoreListener.tracklist_changed` event. :param start: position of first track to shuffle :type start: int or :class:`None`