Various stylistic fixes

- Fix PEP8's line too long warning
- Remove useless parentheses
- Use triple quotes for docstring
- Address pylint's 'inconsistent-return-statements'
- Specify string format arguments as logging function parameters
- Comment out already disabled block of code
- Remove useless else (after return)
- Remove useless statement
- Do not import already imported module
This commit is contained in:
JoeLametta
2019-01-16 20:40:55 +00:00
parent 8dfcc5b5ec
commit 0e17b32740
18 changed files with 40 additions and 43 deletions

View File

@@ -94,7 +94,7 @@ CD in the AccurateRip database."""
except accurip.EntryNotFound:
logger.warning("AccurateRip entry not found: drive offset "
"can't be determined, try again with another disc")
return
return None
if responses:
logger.debug('%d AccurateRip responses found.', len(responses))
@@ -170,6 +170,8 @@ CD in the AccurateRip database."""
logger.error('no matching offset found. '
'Consider trying again with a different disc')
return None
def _arcs(self, runner, table, track, offset):
# rips the track with the given offset, return the arcs checksums
logger.debug('ripping track %r with offset %d...', track, offset)
@@ -196,7 +198,7 @@ CD in the AccurateRip database."""
)
os.unlink(path)
return ("%08x" % v1, "%08x" % v2)
return "%08x" % v1, "%08x" % v2
def _foundOffset(self, device, offset):
print('\nRead offset of device is: %d.' % offset)