Revert "Convert docstrings to reStructuredText"

This reverts commit 3b1bd242d0.
This commit is contained in:
Samantha Baldwin
2018-03-01 21:54:43 -05:00
parent f8fbfb591c
commit 09de58852e
32 changed files with 723 additions and 1064 deletions

View File

@@ -14,28 +14,14 @@ class WhipperLogger(result.Logger):
_errors = False
def log(self, ripResult, epoch=time.time()):
"""Join all logfile lines in a single str.
"""Returns big str: logfile joined text lines"""
:param ripResult:
:type ripResult:
:param epoch: rip time since the epoch (Default value = time.time()).
:type epoch: float
:returns: logfile report
:rtype: str
"""
lines = self.logRip(ripResult, epoch=epoch)
return "\n".join(lines)
def logRip(self, ripResult, epoch):
"""Generate logfile as a list of str lines.
"""Returns logfile lines list"""
:param ripResult:
:type ripResult:
:param epoch: rip time since the epoch.
:type epoch: float
:returns:
:rtype: str
"""
lines = []
# Ripper version
@@ -170,15 +156,8 @@ class WhipperLogger(result.Logger):
return lines
def trackLog(self, trackResult):
"""Generate tracks section lines.
"""Returns Tracks section lines: data picked from trackResult"""
Tracks information are mostly taken from ``trackResult``.
:param trackResult:
:type trackResult:
:returns: tracks section lines.
:rtype: list
"""
lines = []
# Track number

View File

@@ -23,15 +23,6 @@ import time
class TrackResult:
"""I hold information about the rip result of a track.
* *CRC:* calculated 4 byte AccurateRip CRC.
* *DBCRC:* 4 byte AccurateRip CRC from the AR database.
* *DBConfidence:* confidence for the matched AccurateRip DB CRC.
* *DBMaxConfidence:* track's maximum confidence in the AccurateRip DB.
* *DBMaxConfidenceCRC:* maximum confidence CRC.
"""
number = None
filename = None
pregap = 0 # in frames
@@ -49,6 +40,14 @@ class TrackResult:
classVersion = 3
def __init__(self):
"""
CRC: calculated 4 byte AccurateRip CRC
DBCRC: 4 byte AccurateRip CRC from the AR database
DBConfidence: confidence for the matched AccurateRip DB CRC
DBMaxConfidence: track's maximum confidence in the AccurateRip DB
DBMaxConfidenceCRC: maximum confidence CRC
"""
self.AR = {
'v1': {
'CRC': None,
@@ -66,24 +65,20 @@ class TrackResult:
class RipResult:
"""I hold information about the result for rips.
"""
I hold information about the result for rips.
I can be used to write log files.
:cvar offset: sample read offset.
:vartype offset:
:cvar table: the full index table.
:vartype table: L{whipper.image.table.Table}
:cvar vendor: vendor of the CD drive.
:vartype vendor:
:cvar model: model of the CD drive.
:vartype model:
:cvar release: release of the CD drive.
:vartype release:
:cvar cdrdaoVersion: version of cdrdao used for the rip.
:vartype cdrdaoVersion:
:cvar cdparanoiaVersion: version of cdparanoia used for the rip.
:vartype cdparanoiaVersion:
@ivar offset: sample read offset
@ivar table: the full index table
@type table: L{whipper.image.table.Table}
@ivar vendor: vendor of the CD drive
@ivar model: model of the CD drive
@ivar release: release of the CD drive
@ivar cdrdaoVersion: version of cdrdao used for the rip
@ivar cdparanoiaVersion: version of cdparanoia used for the rip
"""
offset = 0
@@ -108,10 +103,11 @@ class RipResult:
self.tracks = []
def getTrackResult(self, number):
"""Get the TrackResult for the given track number.
"""
@param number: the track number (0 for HTOA)
:param number: the track number (0 for HTOA)
:type number: int
@type number: int
@rtype: L{TrackResult}
"""
for t in self.tracks:
if t.number == number:
@@ -121,16 +117,19 @@ class RipResult:
class Logger(object):
"""I log the result of a rip."""
"""
I log the result of a rip.
"""
def log(self, ripResult, epoch=time.time()):
"""Create a log from the given ripresult.
"""
Create a log from the given ripresult.
:param epoch: when the log file gets generated
(Default value = time.time())
:type epoch: float
:param ripResult:
:type ripResult:
@param epoch: when the log file gets generated
@type epoch: float
@type ripResult: L{RipResult}
@rtype: str
"""
raise NotImplementedError
@@ -147,7 +146,11 @@ class EntryPoint(object):
def getLoggers():
"""Get all logger plugins with entry point ``whipper.logger``."""
"""
Get all logger plugins with entry point 'whipper.logger'.
@rtype: dict of C{str} -> C{Logger}
"""
d = {}
pluggables = list(pkg_resources.iter_entry_points("whipper.logger"))