diff --git a/modules/arte/pages.py b/modules/arte/pages.py
index a0e305f1..699720b5 100644
--- a/modules/arte/pages.py
+++ b/modules/arte/pages.py
@@ -32,6 +32,7 @@ from .collection import ArteLiveCollection
__all__ = ['IndexPage', 'VideoPage', 'ArteLivePage', 'ArteLiveCategorieVideoPage', 'ArteLiveVideoPage']
+
class ArteLiveVideoPage(BasePage):
def get_video(self, video=None, lang='fr', quality='hd'):
if not video:
@@ -48,6 +49,7 @@ class ArteLiveVideoPage(BasePage):
video.url = urls.popitem()[1]
return video
+
class ArteLiveCategorieVideoPage(BasePage):
def iter_videos(self, lang='fr'):
videos = list()
@@ -79,7 +81,7 @@ class ArteLiveCategorieVideoPage(BasePage):
en = re.compile("", re.DOTALL)
pix = re.compile("(?<==0 else 'red')
))
diff --git a/weboob/applications/qcookboob/recipe.py b/weboob/applications/qcookboob/recipe.py
index abe14192..f0fa3a0c 100644
--- a/weboob/applications/qcookboob/recipe.py
+++ b/weboob/applications/qcookboob/recipe.py
@@ -17,7 +17,9 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see .
-import urllib, sys, codecs
+import urllib
+import sys
+import codecs
from PyQt4.QtCore import Qt, SIGNAL
from PyQt4.QtGui import QFrame, QImage, QPixmap, QFileDialog
@@ -85,11 +87,11 @@ class Recipe(QFrame):
if not empty(self.recipe.picture_url):
data = urllib.urlopen(self.recipe.picture_url).read()
img = QImage.fromData(data)
- self.ui.imageLabel.setPixmap(QPixmap.fromImage(img).scaledToWidth(250,Qt.SmoothTransformation))
+ self.ui.imageLabel.setPixmap(QPixmap.fromImage(img).scaledToWidth(250, Qt.SmoothTransformation))
def export(self):
fileDial = QFileDialog(self, 'Export "%s" recipe' %
- self.recipe.title, '%s.kreml' % self.recipe.title.replace('/',','), 'Krecipe file (*.kreml);;all files (*)')
+ self.recipe.title, '%s.kreml' % self.recipe.title.replace('/', ','), 'Krecipe file (*.kreml);;all files (*)')
fileDial.setAcceptMode(QFileDialog.AcceptSave)
fileDial.setLabelText(QFileDialog.Accept, 'Export recipe')
fileDial.setLabelText(QFileDialog.FileName, 'Recipe file name')
diff --git a/weboob/applications/qhandjoob/main_window.py b/weboob/applications/qhandjoob/main_window.py
index b3a73d17..0cd61191 100644
--- a/weboob/applications/qhandjoob/main_window.py
+++ b/weboob/applications/qhandjoob/main_window.py
@@ -26,18 +26,20 @@ from weboob.capabilities.job import ICapJob
from .ui.main_window_ui import Ui_MainWindow
+
class JobListWidgetItem(QListWidgetItem):
def __init__(self, job, *args, **kwargs):
QListWidgetItem.__init__(self, *args, **kwargs)
self.job = job
def __lt__(self, other):
- return self.job.publication_date < other.job.publication_date
+ return self.job.publication_date < other.job.publication_date
def setAttrs(self, storage):
- text = u'%s - %s' % (self.job.backend, self.job.title)
+ text = u'%s - %s' % (self.job.backend, self.job.title)
self.setText(text)
+
class MainWindow(QtMainWindow):
def __init__(self, config, storage, weboob, parent=None):
QtMainWindow.__init__(self, parent)
@@ -129,4 +131,3 @@ class MainWindow(QtMainWindow):
self.ui.jobFrame.show()
else:
self.ui.jobFrame.hide()
-
diff --git a/weboob/applications/weboorrents/weboorrents.py b/weboob/applications/weboorrents/weboorrents.py
index 9d6767c5..c2c88eea 100644
--- a/weboob/applications/weboorrents/weboorrents.py
+++ b/weboob/applications/weboorrents/weboorrents.py
@@ -18,7 +18,6 @@
# along with weboob. If not, see .
-
import sys
from weboob.capabilities.torrent import ICapTorrent, MagnetOnly
@@ -56,7 +55,7 @@ class TorrentInfoFormatter(IFormatter):
for f in obj.files:
result += ' * %s\n' % f
result += '\n%sDescription%s\n' % (self.BOLD, self.NC)
- result += '%s'%obj.description
+ result += '%s' % obj.description
return result
@@ -71,6 +70,7 @@ class TorrentListFormatter(PrettyFormatter):
(5, 'green', None),
(10, 'green', 'bold'),
)
+
def _get_color(self, nb):
if empty(nb):
return self.colored('N/A', 'red')
@@ -115,7 +115,7 @@ class Weboorrents(ReplApplication):
Get information about a torrent.
"""
- torrent = self.get_object(id, 'get_torrent', ('description','files'))
+ torrent = self.get_object(id, 'get_torrent', ('description', 'files'))
if not torrent:
print >>sys.stderr, 'Torrent not found: %s' % id
return 3
diff --git a/weboob/capabilities/recipe.py b/weboob/capabilities/recipe.py
index 6e1ce1d5..ac1aeb8c 100644
--- a/weboob/capabilities/recipe.py
+++ b/weboob/capabilities/recipe.py
@@ -19,8 +19,12 @@
from .base import IBaseCap, CapBaseObject, StringField, IntField, Field, empty
+
import lxml.etree as ET
-import base64, re, urllib
+
+import base64
+import re
+import urllib
__all__ = ['Recipe', 'ICapRecipe']
@@ -42,6 +46,7 @@ class Comment():
result += 'comment: %s' % self.text
return result
+
class Recipe(CapBaseObject):
"""
Recipe object.
@@ -108,7 +113,7 @@ class Recipe(CapBaseObject):
datab64 = base64.encodestring(data)[:-1]
pictures = ET.SubElement(desc, 'pictures')
- pic = ET.SubElement(pictures, 'pic', {'format' : 'JPEG', 'id' : '1'})
+ pic = ET.SubElement(pictures, 'pic', {'format': 'JPEG', 'id': '1'})
pic.text = ET.CDATA(datab64)
if not empty(self.ingredients):
diff --git a/weboob/core/ouiboube.py b/weboob/core/ouiboube.py
index 05e11922..dcb9efc3 100644
--- a/weboob/core/ouiboube.py
+++ b/weboob/core/ouiboube.py
@@ -18,8 +18,6 @@
# along with weboob. If not, see .
-
-
import os
import shutil
@@ -39,6 +37,7 @@ __all__ = ['Weboob']
class VersionsMismatchError(ConfigError):
pass
+
class Weboob(object):
"""
The main class of Weboob, used to manage backends and call methods.