fix E228 missing whitespace around modulo operator
see issue https://github.com/gpodder/gpodder/issues/393
This commit is contained in:
parent
41f893806a
commit
52ddd60434
|
@ -54,7 +54,7 @@ class gPodderExtension:
|
|||
""" Play or enqueue selected episodes """
|
||||
|
||||
urls = [episode.url for episode in episodes if SONOS_CAN_PLAY(episode)]
|
||||
logger.info('Streaming to Sonos %s: %s'%(speaker_ip, ', '.join(urls)))
|
||||
logger.info('Streaming to Sonos %s: %s' % (speaker_ip, ', '.join(urls)))
|
||||
|
||||
controller = soco.SoCo(speaker_ip)
|
||||
|
||||
|
|
|
@ -118,4 +118,4 @@ class CoverDownloader(object):
|
|||
return os.path.join(gpodder.images_folder, basename)
|
||||
|
||||
def _fallback_filename(self, title):
|
||||
return self._default_filename('podcast-%d.png' % (hash(title)%5))
|
||||
return self._default_filename('podcast-%d.png' % (hash(title) % 5))
|
||||
|
|
|
@ -65,7 +65,7 @@ def get_header_param(headers, param, header_name):
|
|||
"""
|
||||
value = None
|
||||
try:
|
||||
headers_string = ['%s:%s'%(k,v) for k,v in list(headers.items())]
|
||||
headers_string = ['%s:%s' % (k, v) for k, v in list(headers.items())]
|
||||
msg = email.message_from_string('\n'.join(headers_string))
|
||||
if header_name in msg:
|
||||
raw_value = msg.get_param(param, header=header_name)
|
||||
|
@ -198,7 +198,7 @@ class DownloadURLOpener(urllib.request.FancyURLopener):
|
|||
# Sometimes URLs are not escaped correctly - try to fix them
|
||||
# (see RFC2396; Section 2.4.3. Excluded US-ASCII Characters)
|
||||
# FYI: The omission of "%" in the list is to avoid double escaping!
|
||||
ESCAPE_CHARS = dict((ord(c), '%%%x'%ord(c)) for c in ' <>#"{}|\\^[]`')
|
||||
ESCAPE_CHARS = dict((ord(c), '%%%x' % ord(c)) for c in ' <>#"{}|\\^[]`')
|
||||
|
||||
def __init__( self, channel):
|
||||
self.channel = channel
|
||||
|
|
|
@ -2671,7 +2671,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
|
|||
message = _('You are downloading episodes. You can resume downloads the next time you start gPodder. Do you want to quit now?')
|
||||
|
||||
dialog.set_title(title)
|
||||
dialog.set_markup('<span weight="bold" size="larger">%s</span>\n\n%s'%(title, message))
|
||||
dialog.set_markup('<span weight="bold" size="larger">%s</span>\n\n%s' % (title, message))
|
||||
|
||||
quit_button.grab_focus()
|
||||
result = dialog.run()
|
||||
|
|
|
@ -86,7 +86,7 @@ class Store(object):
|
|||
slot))
|
||||
else:
|
||||
self.db.execute('CREATE TABLE %s (%s)' % (table,
|
||||
', '.join('%s TEXT'%s for s in slots)))
|
||||
', '.join('%s TEXT' % s for s in slots)))
|
||||
|
||||
def convert(self, v):
|
||||
if isinstance(v, str):
|
||||
|
@ -157,7 +157,7 @@ class Store(object):
|
|||
|
||||
values = [self.convert(getattr(o, slot)) for slot in slots]
|
||||
self.db.execute('DELETE FROM %s WHERE %s' % (table,
|
||||
' AND '.join('%s=?'%s for s in slots)), values)
|
||||
' AND '.join('%s=?' % s for s in slots)), values)
|
||||
|
||||
def load(self, class_, **kwargs):
|
||||
with self.lock:
|
||||
|
|
|
@ -89,7 +89,7 @@ def get_metadata(url):
|
|||
headers = track_fp.info()
|
||||
filesize = headers['content-length'] or '0'
|
||||
filetype = headers['content-type'] or 'application/octet-stream'
|
||||
headers_s = '\n'.join('%s:%s'%(k,v) for k, v in list(headers.items()))
|
||||
headers_s = '\n'.join('%s:%s' % (k, v) for k, v in list(headers.items()))
|
||||
filename = get_param(headers_s) or os.path.basename(os.path.dirname(url))
|
||||
track_fp.close()
|
||||
return filesize, filetype, filename
|
||||
|
|
|
@ -1378,11 +1378,11 @@ def format_seconds_to_hour_min_sec(seconds):
|
|||
|
||||
seconds = int(seconds)
|
||||
|
||||
hours = seconds//3600
|
||||
seconds = seconds%3600
|
||||
hours = seconds // 3600
|
||||
seconds = seconds % 3600
|
||||
|
||||
minutes = seconds//60
|
||||
seconds = seconds%60
|
||||
minutes = seconds // 60
|
||||
seconds = seconds % 60
|
||||
|
||||
if hours:
|
||||
result.append(N_('%(count)d hour', '%(count)d hours', hours) % {'count':hours})
|
||||
|
|
Loading…
Reference in New Issue