verified autopep8 on qcineoob, cineoob, suboob, booblyrics, cookboob

This commit is contained in:
Julien Veyssier 2013-03-16 01:57:54 +01:00
commit 62074615da
14 changed files with 146 additions and 138 deletions

View file

@ -40,7 +40,8 @@ COUNTRY_LIST = ['us','fr','de','jp']
class MovieInfoFormatter(IFormatter): class MovieInfoFormatter(IFormatter):
MANDATORY_FIELDS = ('id', 'original_title', 'release_date', 'other_titles', 'duration', 'pitch', 'note', 'roles', 'country') MANDATORY_FIELDS = ('id', 'original_title', 'release_date',
'other_titles', 'duration', 'pitch', 'note', 'roles', 'country')
def format_obj(self, obj, alias): def format_obj(self, obj, alias):
result = u'%s%s%s\n' % (self.BOLD, obj.original_title, self.NC) result = u'%s%s%s\n' % (self.BOLD, obj.original_title, self.NC)

View file

@ -385,7 +385,8 @@ class MainWindow(QtMainWindow):
self.current_info_widget = wsubtitle self.current_info_widget = wsubtitle
def closeEvent(self, ev): def closeEvent(self, ev):
self.config.set('settings', 'backend', str(self.ui.backendEdit.itemData(self.ui.backendEdit.currentIndex()).toString())) self.config.set('settings', 'backend', str(self.ui.backendEdit.itemData(
self.ui.backendEdit.currentIndex()).toString()))
self.saveSearchHistory() self.saveSearchHistory()
self.config.save() self.config.save()

View file

@ -64,4 +64,5 @@ class MiniMovie(QFrame):
QApplication.setOverrideCursor(Qt.WaitCursor) QApplication.setOverrideCursor(Qt.WaitCursor)
movie = self.backend.get_movie(self.movie.id) movie = self.backend.get_movie(self.movie.id)
if movie: if movie:
self.parent.doAction('Details of movie "%s"'%movie.original_title,self.parent.displayMovie,[movie,self.backend]) self.parent.doAction('Details of movie "%s"' %
movie.original_title, self.parent.displayMovie, [movie, self.backend])

View file

@ -70,4 +70,5 @@ class MiniPerson(QFrame):
QApplication.setOverrideCursor(Qt.WaitCursor) QApplication.setOverrideCursor(Qt.WaitCursor)
person = self.backend.get_person(self.person.id) person = self.backend.get_person(self.person.id)
if person: if person:
self.parent.doAction(u'Details of person "%s"'%person.name,self.parent.displayPerson,[person,self.backend]) self.parent.doAction(u'Details of person "%s"' %
person.name, self.parent.displayPerson, [person, self.backend])

View file

@ -51,4 +51,5 @@ class MiniSubtitle(QFrame):
subtitle = self.backend.get_subtitle(self.subtitle.id) subtitle = self.backend.get_subtitle(self.subtitle.id)
if subtitle: if subtitle:
self.parent.doAction('Details of subtitle "%s"'%subtitle.name,self.parent.displaySubtitle,[subtitle,self.backend]) self.parent.doAction('Details of subtitle "%s"' %
subtitle.name, self.parent.displaySubtitle, [subtitle, self.backend])

View file

@ -54,4 +54,5 @@ class MiniTorrent(QFrame):
torrent = self.backend.get_torrent(self.torrent.id) torrent = self.backend.get_torrent(self.torrent.id)
if torrent: if torrent:
self.parent.doAction('Details of torrent "%s"'%torrent.name,self.parent.displayTorrent,[torrent,self.backend]) self.parent.doAction('Details of torrent "%s"' %
torrent.name, self.parent.displayTorrent, [torrent, self.backend])

View file

@ -60,7 +60,8 @@ class Subtitle(QFrame):
self.ui.verticalLayout.setAlignment(Qt.AlignTop) self.ui.verticalLayout.setAlignment(Qt.AlignTop)
def download(self): def download(self):
fileDial = QFileDialog(self,'Save "%s" subtitle file'%self.subtitle.name,'%s'%self.subtitle.name,'all files (*)') fileDial = QFileDialog(self, 'Save "%s" subtitle file' %
self.subtitle.name, '%s' % self.subtitle.name, 'all files (*)')
fileDial.setAcceptMode(QFileDialog.AcceptSave) fileDial.setAcceptMode(QFileDialog.AcceptSave)
fileDial.setLabelText(QFileDialog.Accept, 'Save subtitle file') fileDial.setLabelText(QFileDialog.Accept, 'Save subtitle file')
fileDial.setLabelText(QFileDialog.FileName, 'Subtitle file name') fileDial.setLabelText(QFileDialog.FileName, 'Subtitle file name')

View file

@ -60,7 +60,8 @@ class Torrent(QFrame):
self.ui.verticalLayout.setAlignment(Qt.AlignTop) self.ui.verticalLayout.setAlignment(Qt.AlignTop)
def download(self): def download(self):
fileDial = QFileDialog(self,'Save "%s" torrent file'%self.torrent.name,'%s.torrent'%self.torrent.name,'Torrent file (*.torrent);;all files (*)') fileDial = QFileDialog(self, 'Save "%s" torrent file' % self.torrent.name, '%s.torrent' %
self.torrent.name, 'Torrent file (*.torrent);;all files (*)')
fileDial.setAcceptMode(QFileDialog.AcceptSave) fileDial.setAcceptMode(QFileDialog.AcceptSave)
fileDial.setLabelText(QFileDialog.Accept, 'Save torrent file') fileDial.setLabelText(QFileDialog.Accept, 'Save torrent file')
fileDial.setLabelText(QFileDialog.FileName, 'Torrent file name') fileDial.setLabelText(QFileDialog.FileName, 'Torrent file name')