Change documentation from epydoc to reStructuredText

Thanks to Freso for all the useful comments!

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
JoeLametta
2019-03-22 12:43:27 +00:00
parent 1ae6240e63
commit 69f8f39c49
15 changed files with 211 additions and 214 deletions

View File

@@ -88,10 +88,10 @@ class ProgressParser:
def __init__(self, start, stop):
"""
@param start: first frame to rip
@type start: int
@param stop: last frame to rip (inclusive)
@type stop: int
:param start: first frame to rip
:type start: int
:param stop: last frame to rip (inclusive)
:type stop: int
"""
self.start = start
self.stop = stop
@@ -205,8 +205,6 @@ class ProgressParser:
class ReadTrackTask(task.Task):
"""
I am a task that reads a track using cdparanoia.
@ivar reads: how many reads were done to rip the track
"""
description = "Reading track"
@@ -221,22 +219,22 @@ class ReadTrackTask(task.Task):
"""
Read the given track.
@param path: where to store the ripped track
@type path: unicode
@param table: table of contents of CD
@type table: L{table.Table}
@param start: first frame to rip
@type start: int
@param stop: last frame to rip (inclusive); >= start
@type stop: int
@param offset: read offset, in samples
@type offset: int
@param device: the device to rip from
@type device: str
@param action: a string representing the action; e.g. Read/Verify
@type action: str
@param what: a string representing what's being read; e.g. Track
@type what: str
:param path: where to store the ripped track
:type path: unicode
:param table: table of contents of CD
:type table: table.Table
:param start: first frame to rip
:type start: int
:param stop: last frame to rip (inclusive); >= start
:type stop: int
:param offset: read offset, in samples
:type offset: int
:param device: the device to rip from
:type device: str
:param action: a string representing the action; e.g. Read/Verify
:type action: str
:param what: a string representing what's being read; e.g. Track
:type what: str
"""
assert isinstance(path, unicode), "%r is not unicode" % path
@@ -403,17 +401,16 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
The path where the file is stored can be changed if necessary, for
example if the file name is too long.
@ivar path: the path where the file is to be stored.
@ivar checksum: the checksum of the track; set if they match.
@ivar testchecksum: the test checksum of the track.
@ivar copychecksum: the copy checksum of the track.
@ivar testspeed: the test speed of the track, as a multiple of
:cvar checksum: the checksum of the track; set if they match.
:cvar testchecksum: the test checksum of the track.
:cvar copychecksum: the copy checksum of the track.
:cvar testspeed: the test speed of the track, as a multiple of
track duration.
@ivar copyspeed: the copy speed of the track, as a multiple of
:cvar copyspeed: the copy speed of the track, as a multiple of
track duration.
@ivar testduration: the test duration of the track, in seconds.
@ivar copyduration: the copy duration of the track, in seconds.
@ivar peak: the peak level of the track
:cvar testduration: the test duration of the track, in seconds.
:cvar copyduration: the copy duration of the track, in seconds.
:cvar peak: the peak level of the track
"""
checksum = None
@@ -432,20 +429,20 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
def __init__(self, path, table, start, stop, overread, offset=0,
device=None, taglist=None, what="track"):
"""
@param path: where to store the ripped track
@type path: str
@param table: table of contents of CD
@type table: L{table.Table}
@param start: first frame to rip
@type start: int
@param stop: last frame to rip (inclusive)
@type stop: int
@param offset: read offset, in samples
@type offset: int
@param device: the device to rip from
@type device: str
@param taglist: a dict of tags
@type taglist: dict
:param path: where to store the ripped track
:type path: str
:param table: table of contents of CD
:type table: table.Table
:param start: first frame to rip
:type start: int
:param stop: last frame to rip (inclusive)
:type stop: int
:param offset: read offset, in samples
:type offset: int
:param device: the device to rip from
:type device: str
:param taglist: a dict of tags
:type taglist: dict
"""
task.MultiSeparateTask.__init__(self)

View File

@@ -69,12 +69,12 @@ class ReadTOCTask(task.Task):
"""
Read the TOC for 'device'.
@param device: block device to read TOC from
@type device: str
@param fast_toc: If to use fast-toc cdrdao mode
@type fast_toc: bool
@param toc_path: Where to save TOC if wanted.
@type toc_path: str
:param device: block device to read TOC from
:type device: str
:param fast_toc: If to use fast-toc cdrdao mode
:type fast_toc: bool
:param toc_path: Where to save TOC if wanted.
:type toc_path: str
"""
self.device = device

View File

@@ -13,7 +13,7 @@ class AudioLengthTask(ctask.PopenTask):
"""
I calculate the length of a track in audio samples.
@ivar length: length of the decoded audio file, in audio samples.
:cvar length: length of the decoded audio file, in audio samples.
"""
logCategory = 'AudioLengthTask'
description = 'Getting length of audio track'
@@ -21,7 +21,7 @@ class AudioLengthTask(ctask.PopenTask):
def __init__(self, path):
"""
@type path: unicode
:type path: unicode
"""
assert isinstance(path, unicode), "%r is not unicode" % path