Easy spacing fixes, trailing stuff
Remove useless trailing \ Remove trailing spaces Add missing empty lines autopep8 -ir -j2 --select=E301,E302,E502,W291,W293,W391 . Diff quickly checked.
This commit is contained in:
parent
c21d1f7925
commit
7094931c92
231 changed files with 474 additions and 67 deletions
|
|
@ -30,6 +30,7 @@ from weboob.tools.misc import to_unicode
|
|||
|
||||
from .ui.main_window_ui import Ui_MainWindow
|
||||
|
||||
|
||||
class MainWindow(QtMainWindow):
|
||||
def __init__(self, config, weboob, parent=None):
|
||||
QtMainWindow.__init__(self, parent)
|
||||
|
|
@ -102,11 +103,11 @@ class MainWindow(QtMainWindow):
|
|||
_id = unicode(self.ui.idEdit.text())
|
||||
if not _id:
|
||||
return
|
||||
|
||||
|
||||
self.ui.loadButton.setEnabled(False)
|
||||
self.ui.loadButton.setText('Loading...')
|
||||
self.ui.contentEdit.setReadOnly(True)
|
||||
|
||||
|
||||
backend = str(self.ui.backendBox.currentText())
|
||||
self.process = QtDo(self.weboob,
|
||||
self._loadedPage,
|
||||
|
|
@ -137,7 +138,7 @@ class MainWindow(QtMainWindow):
|
|||
self.ui.contentEdit.setPlainText(self.content.content)
|
||||
self.setWindowTitle("QWebcontentedit - %s@%s" %(self.content.id,
|
||||
backend.name))
|
||||
self.backend = backend
|
||||
self.backend = backend
|
||||
|
||||
def _errorLoadPage(self, backend, error, backtrace):
|
||||
""" Error callback for loadPage """
|
||||
|
|
@ -203,7 +204,7 @@ class MainWindow(QtMainWindow):
|
|||
|
||||
self.ui.loadHistoryButton.setEnabled(False)
|
||||
self.ui.loadHistoryButton.setText("Loading...")
|
||||
|
||||
|
||||
self.ui.historyTable.clear()
|
||||
self.ui.historyTable.setRowCount(0)
|
||||
|
||||
|
|
@ -212,7 +213,7 @@ class MainWindow(QtMainWindow):
|
|||
"Author",
|
||||
"Summary"])
|
||||
self.ui.historyTable.setColumnWidth(3, 1000)
|
||||
|
||||
|
||||
self.process = QtDo(self.weboob,
|
||||
self._gotRevision,
|
||||
self._errorHistory)
|
||||
|
|
@ -234,13 +235,13 @@ class MainWindow(QtMainWindow):
|
|||
# are not modifiable (they are modifiable by default)
|
||||
item_revision = QTableWidgetItem(revision.id)
|
||||
item_revision.setFlags(Qt.ItemIsEnabled)
|
||||
|
||||
|
||||
item_time = QTableWidgetItem(revision.timestamp.strftime('%Y-%m-%d %H:%M:%S'))
|
||||
item_time.setFlags(Qt.ItemIsEnabled)
|
||||
|
||||
|
||||
item_author = QTableWidgetItem(revision.author)
|
||||
item_author.setFlags(Qt.ItemIsEnabled)
|
||||
|
||||
|
||||
item_summary = QTableWidgetItem(revision.comment)
|
||||
item_summary.setFlags(Qt.ItemIsEnabled)
|
||||
|
||||
|
|
@ -260,6 +261,6 @@ class MainWindow(QtMainWindow):
|
|||
content += '\n%s\n' % to_unicode(backtrace)
|
||||
QMessageBox.critical(self, self.tr('Error while loading history'),
|
||||
content, QMessageBox.Ok)
|
||||
|
||||
|
||||
self.ui.loadHistoryButton.setEnabled(True)
|
||||
self.ui.loadHistoryButton.setText("Reload")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue