Code clarity fixes

autopep8 -ir -j2 --select=E303,E125
Diff checked manually.
This commit is contained in:
Laurent Bachelier 2013-03-15 19:54:17 +01:00
commit c21d1f7925
37 changed files with 6 additions and 59 deletions

View file

@ -764,7 +764,6 @@ class Boobathon(ReplApplication):
print >>sys.stderr, "There isn't any task in progress."
return 1
def load_default_backends(self):
"""
Overload a BaseApplication method.

View file

@ -181,7 +181,6 @@ class Boobill(ReplApplication):
self.download_all(dest, names)
return
if dest is None:
for backend, bill in self.do('get_bill', id, backends=names):
dest = id + "." + bill.format
@ -215,5 +214,4 @@ class Boobill(ReplApplication):
print >>sys.stderr, 'Unable to write bill in "%s": %s' % (dest, e)
return 1
return

View file

@ -559,7 +559,6 @@ class Cineoob(ReplApplication):
self.format(subtitle)
self.flush()
def complete_getfile_subtitle(self, text, line, *ignored):
args = line.split(' ', 2)
if len(args) == 2:

View file

@ -132,7 +132,6 @@ class MasstransitHildon():
self.treestore = gtk.TreeStore(str, str, str, str, str)
treeview = gtk.TreeView(self.treestore)
treeview.append_column(
gtk.TreeViewColumn(
'Train',
@ -166,8 +165,6 @@ class MasstransitHildon():
text=4
))
vertical_box = gtk.VBox()
vertical_box.pack_start(horizontal_box)
horizontal_box.pack_start(self.retour_button)

View file

@ -289,7 +289,6 @@ class MainWindow(QtMainWindow):
return False
def setHousing(self, housing, nottext='Loading...'):
if self.housing is not None:
self.saveNotes()

View file

@ -65,7 +65,6 @@ class ThreadMessage(QFrame):
content = message.content.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('\n', '<br />')
self.ui.contentLabel.setText(content)
def __eq__(self, m):
if not isinstance(m, Message):
return False
@ -199,8 +198,6 @@ class ContactThread(QWidget):
self.process_reply = None
class ContactProfile(QWidget):
def __init__(self, weboob, contact, parent=None):
@ -362,7 +359,6 @@ class ContactNotes(QWidget):
self.connect(self.ui.saveButton, SIGNAL('clicked()'), self.saveNotes)
def _getNotes_cb(self, backend, data):
if not backend or not data:
self.process = None

View file

@ -87,7 +87,7 @@ class MainWindow(QtMainWindow):
def updateVideosDisplay(self):
for minivideo in self.minivideos:
if (minivideo.video.nsfw and self.ui.nsfwCheckBox.isChecked() or
not minivideo.video.nsfw and self.ui.sfwCheckBox.isChecked()):
not minivideo.video.nsfw and self.ui.sfwCheckBox.isChecked()):
minivideo.show()
else:
minivideo.hide()
@ -119,7 +119,7 @@ class MainWindow(QtMainWindow):
self.ui.scrollAreaContent.layout().addWidget(minivideo)
self.minivideos.append(minivideo)
if (video.nsfw and not self.ui.nsfwCheckBox.isChecked() or
not video.nsfw and not self.ui.sfwCheckBox.isChecked()):
not video.nsfw and not self.ui.sfwCheckBox.isChecked()):
minivideo.hide()
def openURL(self):

View file

@ -118,7 +118,6 @@ class Suboob(ReplApplication):
self.format(subtitle)
self.flush()
def complete_getfile(self, text, line, *ignored):
args = line.split(' ', 2)
if len(args) == 2:

View file

@ -639,7 +639,6 @@ class Repositories(object):
except BrowserUnavailable, e:
raise ModuleInstallError('Unable to fetch module: %s' % e)
# Check signature
if module.signed and Keyring.find_gpgv():
progress.progress(0.5, 'Checking module authenticity...')
@ -651,7 +650,6 @@ class Repositories(object):
if not keyring.is_valid(tardata, sig_data):
raise ModuleInstallError('Invalid signature for %s.' % module.name)
# Extract module from tarball.
if os.path.isdir(module_dir):
shutil.rmtree(module_dir)

View file

@ -381,7 +381,7 @@ class BackendCfg(QDialog):
', '.join(sorted(cap.__name__.replace('ICap', '') for cap in module.iter_caps()))))
if module.has_caps(ICapAccount) and self.ui.nameEdit.isEnabled() and \
module.klass.ACCOUNT_REGISTER_PROPERTIES is not None:
module.klass.ACCOUNT_REGISTER_PROPERTIES is not None:
self.ui.registerButton.show()
else:
self.ui.registerButton.hide()

View file

@ -330,7 +330,6 @@ class ReplApplication(Cmd, ConsoleApplication):
return cmd, arg, ignored
def onecmd(self, line):
"""
This REPL method is overrided to catch some particular exceptions.