fix W391 blank line at end of file
This commit is contained in:
parent
750e11dc7b
commit
a90fa0b521
|
@ -1,5 +1,5 @@
|
|||
[pycodestyle]
|
||||
count=1
|
||||
select = W1, W2, E114, E115, E125, E129, E211, E222, E227, E266, E271, E272, E3, E703, E711, E712, E713, E721, E9
|
||||
select = W1, W2, W3, E114, E115, E125, E129, E211, E222, E227, E266, E271, E272, E3, E703, E711, E712, E713, E721, E9
|
||||
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
|
||||
max-line-length = 100
|
||||
|
|
|
@ -34,4 +34,3 @@ interface = dbus.Interface(proxy, gpodder.dbus_interface)
|
|||
if not interface.mark_episode_played(filename):
|
||||
print('Warning: Could not mark episode as played.', file=sys.stderr)
|
||||
sys.exit(2)
|
||||
|
||||
|
|
|
@ -99,4 +99,3 @@ class gPodderExtension:
|
|||
return None
|
||||
|
||||
return [(_('Concatenate videos'), self._concatenate_videos)]
|
||||
|
||||
|
|
|
@ -122,4 +122,3 @@ class gPodderExtension:
|
|||
|
||||
self.status_icon.set_from_pixbuf(icon)
|
||||
self.last_progress = progress
|
||||
|
||||
|
|
|
@ -317,4 +317,3 @@ class gPodderExtension:
|
|||
def on_unload(self):
|
||||
self.notifier.remove_from_connection(self.session_bus, self.path)
|
||||
self.rcvr.stop_receiving()
|
||||
|
||||
|
|
|
@ -105,4 +105,3 @@ class gPodderExtension:
|
|||
def convert_episodes(self, episodes):
|
||||
for episode in episodes:
|
||||
self._convert_episode(episode)
|
||||
|
||||
|
|
|
@ -117,4 +117,3 @@ class gPodderExtension(object):
|
|||
def on_unload(self):
|
||||
if self.notifier is not None:
|
||||
self.notifier.remove()
|
||||
|
||||
|
|
|
@ -69,4 +69,3 @@ else:
|
|||
except:
|
||||
# See http://gpodder.org/bug/966
|
||||
pass
|
||||
|
||||
|
|
|
@ -66,4 +66,3 @@ class gPodderExtension:
|
|||
# Avoid filename collisions
|
||||
if not os.path.exists(filename):
|
||||
return filename
|
||||
|
||||
|
|
|
@ -97,4 +97,3 @@ class gPodderExtension:
|
|||
ogg.save()
|
||||
except Exception as e:
|
||||
logger.warn('Failed to remove OGG cover: %s', e, exc_info=True)
|
||||
|
||||
|
|
|
@ -40,4 +40,3 @@ class gPodderExtension:
|
|||
logger.info('Syncing cover art for %s', episode.channel.title)
|
||||
# copy and rename art
|
||||
shutil.copy(episode_art, device_art)
|
||||
|
||||
|
|
|
@ -181,4 +181,3 @@ class gPodderExtension:
|
|||
int(progress * 100), 100)
|
||||
else:
|
||||
self.taskbar.SetProgressState(self.window_handle, TBPF_NOPROGRESS)
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ class gPodderExtension(object):
|
|||
srt_filename = self.get_srt_filename(filename)
|
||||
if os.path.exists(srt_filename):
|
||||
os.remove(srt_filename)
|
||||
|
||||
|
|
|
@ -71,4 +71,3 @@ class gPodderExtension:
|
|||
if name == 'gpodder-gtk':
|
||||
self.gpodder = ui_object
|
||||
self._rebuild_menu()
|
||||
|
||||
|
|
|
@ -103,4 +103,3 @@ else:
|
|||
reader.read()
|
||||
|
||||
loop.quit()
|
||||
|
||||
|
|
|
@ -116,4 +116,3 @@ class gPodderExtension:
|
|||
def _convert_episodes(self, episodes):
|
||||
for episode in episodes:
|
||||
self._convert_episode(episode)
|
||||
|
||||
|
|
|
@ -133,4 +133,3 @@ def get_expired_episodes(channels, config):
|
|||
continue
|
||||
|
||||
yield episode
|
||||
|
||||
|
|
|
@ -390,4 +390,3 @@ class Config(object):
|
|||
name = gPodderSettings_LegacySupport[name]
|
||||
|
||||
setattr(self.__json_config, name, value)
|
||||
|
||||
|
|
|
@ -58,4 +58,3 @@ class Core(object):
|
|||
|
||||
# Close the database and store outstanding changes
|
||||
self.db.close()
|
||||
|
||||
|
|
|
@ -119,4 +119,3 @@ class CoverDownloader(object):
|
|||
|
||||
def _fallback_filename(self, title):
|
||||
return self._default_filename('podcast-%d.png' % (hash(title)%5))
|
||||
|
||||
|
|
|
@ -281,4 +281,3 @@ class Database(object):
|
|||
cur = self.cursor()
|
||||
cur.execute('DELETE FROM %s WHERE podcast_id = ? AND guid = ?' %
|
||||
self.TABLE_EPISODE, (podcast_id, guid))
|
||||
|
||||
|
|
|
@ -147,4 +147,3 @@ class DBusPodcastsProxy(dbus.service.Object):
|
|||
def check_for_updates(self):
|
||||
"""Check for new episodes or offer subscriptions"""
|
||||
self._on_check_for_updates()
|
||||
|
||||
|
|
|
@ -886,4 +886,3 @@ class DownloadTask(object):
|
|||
|
||||
# We finished, but not successfully (at least not really)
|
||||
return False
|
||||
|
||||
|
|
|
@ -75,7 +75,3 @@ def update_using_feedservice(podcasts):
|
|||
parsed_episodes = [parse_entry(podcast, entry) for entry in feed['episodes']]
|
||||
|
||||
# ...
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -16,4 +16,3 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
|
|
@ -149,4 +149,3 @@ class GtkBuilderWidget(object):
|
|||
after a program is finished by pressing Control-C.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
|
|
@ -181,4 +181,3 @@ class UIConfig(config.Config):
|
|||
window.show()
|
||||
if cfg.maximized:
|
||||
window.maximize()
|
||||
|
||||
|
|
|
@ -16,4 +16,3 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
|
|
@ -219,4 +219,3 @@ class gPodderChannel(BuilderWidget):
|
|||
|
||||
self.update_podcast_list_model(selected=True,
|
||||
sections_changed=section_changed)
|
||||
|
||||
|
|
|
@ -112,4 +112,3 @@ class gPodderDevicePlaylist(object):
|
|||
fp.write(filename)
|
||||
fp.write(self.linebreak)
|
||||
fp.close()
|
||||
|
||||
|
|
|
@ -421,4 +421,3 @@ class gPodderEpisodeSelector(BuilderWidget):
|
|||
self.gPodderEpisodeSelector.destroy()
|
||||
if self.callback is not None:
|
||||
self.callback([])
|
||||
|
||||
|
|
|
@ -311,4 +311,3 @@ class gPodderSyncUI(object):
|
|||
# 2. Check for free space (in UI thread)
|
||||
# 3. Sync the device (in UI thread)
|
||||
util.run_in_background(cleanup_episodes)
|
||||
|
||||
|
|
|
@ -40,4 +40,3 @@ class gPodderWelcome(BuilderWidget):
|
|||
|
||||
def on_btnCancel_clicked(self, button):
|
||||
self.main_window.response(Gtk.ResponseType.CANCEL)
|
||||
|
||||
|
|
|
@ -216,4 +216,3 @@ class UserAppsReader(object):
|
|||
if app.is_mime(mimetype):
|
||||
model.insert_app(app.get_icon(), app.name, app.cmd)
|
||||
return model
|
||||
|
||||
|
|
|
@ -181,5 +181,3 @@ class DownloadTaskMonitor(object):
|
|||
elif task.status in (task.QUEUED, task.DOWNLOADING):
|
||||
self._on_can_pause()
|
||||
self._status = task.status
|
||||
|
||||
|
||||
|
|
|
@ -16,4 +16,3 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
|
|
@ -90,4 +90,3 @@ class gPodderAddPodcast(BuilderWidget):
|
|||
if self.add_podcast_list is not None:
|
||||
title = None # FIXME: Add title GUI element
|
||||
self.add_podcast_list([(title, url)])
|
||||
|
||||
|
|
|
@ -295,4 +295,3 @@ class TreeViewHelper(object):
|
|||
|
||||
return (x, y, True)
|
||||
return position_func
|
||||
|
||||
|
|
|
@ -108,4 +108,3 @@ class gPodderConfigEditor(BuilderWidget):
|
|||
|
||||
def on_gPodderConfigEditor_destroy(self, widget):
|
||||
self.model.stop_observing()
|
||||
|
||||
|
|
|
@ -114,4 +114,3 @@ class ProgressIndicator(object):
|
|||
if self.dialog is not None:
|
||||
self.dialog.destroy()
|
||||
GObject.source_remove(self.source_id)
|
||||
|
||||
|
|
|
@ -104,4 +104,3 @@ class TagCloud(Gtk.Layout):
|
|||
|
||||
|
||||
GObject.type_register(TagCloud)
|
||||
|
||||
|
|
|
@ -111,4 +111,3 @@ def register_handlers(gp):
|
|||
""" register the events handlers (and keep a reference to gPodder's instance)"""
|
||||
if handler is not None:
|
||||
handler.register(gp)
|
||||
|
||||
|
|
|
@ -3762,4 +3762,3 @@ def main(options=None):
|
|||
gp = gPodderApplication(options)
|
||||
gp.run()
|
||||
sys.exit(0)
|
||||
|
||||
|
|
|
@ -904,4 +904,3 @@ class PodcastListModel(Gtk.ListStore):
|
|||
if row[self.C_URL] == channel.url:
|
||||
row[self.C_COVER] = pixbuf
|
||||
break
|
||||
|
||||
|
|
|
@ -135,4 +135,3 @@ class CoverDownloader(ObservableService):
|
|||
self.notify('cover-available', channel, pixbuf)
|
||||
else:
|
||||
return (channel.url, pixbuf)
|
||||
|
||||
|
|
|
@ -129,4 +129,3 @@ class SpinningProgressIndicator(Gtk.Image):
|
|||
if self._frame_id >= len(self._frames):
|
||||
self._frame_id = 0
|
||||
self.set_from_pixbuf(self._frames[self._frame_id])
|
||||
|
||||
|
|
|
@ -225,4 +225,3 @@ class JsonConfig(object):
|
|||
if target is None or not isinstance(target, dict):
|
||||
target_dict[attr] = target = {}
|
||||
target_dict = target
|
||||
|
||||
|
|
|
@ -86,4 +86,3 @@ def setup(verbose=True):
|
|||
for name in ('cli', 'gtk') if getattr(gpodder.ui, name, False)))
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
@ -225,4 +225,3 @@ if __name__ == '__main__':
|
|||
# A schema update takes place here
|
||||
m.save(Person('User %d' % x, x*20, 'user@home.com') for x in range(50))
|
||||
print(m.load(Person))
|
||||
|
||||
|
|
|
@ -1261,4 +1261,3 @@ class Model(object):
|
|||
Returns a iterable, sorted sequence of the episodes
|
||||
"""
|
||||
return sorted(episodes, key=cls.episode_sort_key, reverse=reverse)
|
||||
|
||||
|
|
|
@ -665,4 +665,3 @@ class Directory(object):
|
|||
return [(p.title or p.url, p.url)
|
||||
for p in self.client.search_podcasts(query)
|
||||
if p.url]
|
||||
|
||||
|
|
|
@ -195,4 +195,3 @@ class Exporter(object):
|
|||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
@ -81,4 +81,3 @@ class MediaPlayerDBusReceiver(object):
|
|||
if file_uri.startswith('/'):
|
||||
file_uri = 'file://' + urllib.parse.quote(file_uri)
|
||||
self.on_play_event(start, end, total, file_uri)
|
||||
|
||||
|
|
|
@ -253,4 +253,3 @@ model.register_custom_handler(SoundcloudFavFeed)
|
|||
def search_for_user(query):
|
||||
json_url = 'https://api.soundcloud.com/users.json?q=%s&consumer_key=%s' % (urllib.parse.quote(query), CONSUMER_KEY)
|
||||
return json.loads(util.urlopen(json_url).read().decode('utf-8'))
|
||||
|
||||
|
|
|
@ -175,5 +175,3 @@ def UserEQL(query):
|
|||
return EQL("'%s'" % query)
|
||||
else:
|
||||
return EQL(query)
|
||||
|
||||
|
||||
|
|
|
@ -323,4 +323,3 @@ def check_data(db):
|
|||
'WHERE podcast_id NOT IN (SELECT id FROM podcast)')
|
||||
if orphan_episodes > 0:
|
||||
logger.error('Orphaned episodes found in database')
|
||||
|
||||
|
|
|
@ -61,5 +61,3 @@ class ObservableService(object):
|
|||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
@ -1102,4 +1102,3 @@ class SyncTask(download.DownloadTask):
|
|||
|
||||
# We finished, but not successfully (at least not really)
|
||||
return False
|
||||
|
||||
|
|
|
@ -51,4 +51,3 @@ class TestEpisodePublishedProperties(unittest.TestCase):
|
|||
|
||||
def test_pubdate_day(self):
|
||||
self.assertEqual(self.episode.pubdate_day, self.PUBLISHED_DAY)
|
||||
|
||||
|
|
|
@ -117,4 +117,3 @@ def get_real_channel_url(url):
|
|||
|
||||
def get_real_cover(url):
|
||||
return None
|
||||
|
||||
|
|
|
@ -14,4 +14,3 @@ class SessionBus(object):
|
|||
|
||||
|
||||
SystemBus = SessionBus
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ class DBusException(Exception):
|
|||
|
||||
class NameExistsException(Exception):
|
||||
pass
|
||||
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
class DBusGMainLoop(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -11,4 +11,3 @@ class BusName(object):
|
|||
class Object:
|
||||
def __init__(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
|
|
|
@ -60,4 +60,3 @@ for language in sorted(languages):
|
|||
print("""
|
||||
Total translations: %s
|
||||
""" % (len(languages)))
|
||||
|
||||
|
|
|
@ -63,4 +63,3 @@ for module, required_files in MODULES:
|
|||
shutil.move(os.path.join(tmp_dir, name), target_file)
|
||||
|
||||
shutil.rmtree(tmp_dir)
|
||||
|
||||
|
|
|
@ -32,4 +32,3 @@ for y in range(1):
|
|||
w.set_default_size(400, 100)
|
||||
w.show_all()
|
||||
Gtk.main()
|
||||
|
||||
|
|
|
@ -120,4 +120,3 @@ if __name__ == '__main__':
|
|||
""" % locals())
|
||||
while True:
|
||||
httpd.handle_request()
|
||||
|
||||
|
|
Loading…
Reference in New Issue