changeset 638:6821fc06a324

misc: a few "cosmetic" changes (PEP 8...)
author souliane <souliane@mailoo.org>
date Thu, 05 Sep 2013 20:57:00 +0200
parents 3b02554d4c8b
children 99eee75ec1b7
files frontends/src/primitivus/chat.py frontends/src/primitivus/notify.py frontends/src/primitivus/primitivus frontends/src/quick_frontend/quick_chat_list.py frontends/src/wix/chat.py src/plugins/plugin_xep_0047.py src/plugins/plugin_xep_0065.py src/plugins/plugin_xep_0096.py
diffstat 8 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py	Sun Sep 08 19:13:02 2013 +0200
+++ b/frontends/src/primitivus/chat.py	Thu Sep 05 20:57:00 2013 +0200
@@ -71,6 +71,7 @@
         render_txt.append(self.message)
         return urwid.Text(render_txt, align=self.align)
 
+
 class Chat(urwid.WidgetWrap, QuickChat):
 
     def __init__(self, target, host, type='one2one'):
--- a/frontends/src/primitivus/notify.py	Sun Sep 08 19:13:02 2013 +0200
+++ b/frontends/src/primitivus/notify.py	Thu Sep 05 20:57:00 2013 +0200
@@ -43,7 +43,6 @@
         except:
             self.freedesktop_int = None
 
-
     def getFocus(self):
         if not self.display:
             return 0
@@ -73,4 +72,6 @@
             hints = dbus.Dictionary(signature='sv')
             expire_timeout = -1
 
-            self.freedesktop_int.Notify(app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout)
+            self.freedesktop_int.Notify(app_name, replaces_id, app_icon,
+                                        summary, body, actions,
+                                        hints, expire_timeout)
--- a/frontends/src/primitivus/primitivus	Sun Sep 08 19:13:02 2013 +0200
+++ b/frontends/src/primitivus/primitivus	Thu Sep 05 20:57:00 2013 +0200
@@ -614,4 +614,3 @@
 
 sat = PrimitivusApp()
 sat.start()
-
--- a/frontends/src/quick_frontend/quick_chat_list.py	Sun Sep 08 19:13:02 2013 +0200
+++ b/frontends/src/quick_frontend/quick_chat_list.py	Thu Sep 05 20:57:00 2013 +0200
@@ -33,7 +33,7 @@
         if not self.has_key(target.short):
             #we have to create the chat win
             self[target.short] = self.createChat(target)
-        return dict.__getitem__(self,target.short)
+        return dict.__getitem__(self, target.short)
 
     def createChat(self, target):
         raise NotImplementedError
--- a/frontends/src/wix/chat.py	Sun Sep 08 19:13:02 2013 +0200
+++ b/frontends/src/wix/chat.py	Thu Sep 05 20:57:00 2013 +0200
@@ -199,10 +199,10 @@
 
     def onEnterPressed(self, event):
         """Behaviour when enter pressed in send line."""
-        self.host.sendMessage(self.target.short if self.type=='group' else self.target,
-                                     event.GetString(),
-                                     mess_type = "groupchat" if self.type=='group' else "chat",
-                                     profile_key=self.host.profile)
+        self.host.sendMessage(self.target.short if self.type == 'group' else self.target,
+                              event.GetString(),
+                              mess_type="groupchat" if self.type == 'group' else "chat",
+                              profile_key=self.host.profile)
         self.textBox.Clear()
 
     def __blink(self):
--- a/src/plugins/plugin_xep_0047.py	Sun Sep 08 19:13:02 2013 +0200
+++ b/src/plugins/plugin_xep_0047.py	Thu Sep 05 20:57:00 2013 +0200
@@ -75,7 +75,8 @@
     def _timeOut(self, sid, profile):
         """Delecte current_stream id, called after timeout
         @param id: id of client.xep_0047_current_stream"""
-        info(_("In-Band Bytestream: TimeOut reached for id %s [%s]") % (sid, profile))
+        info(_("In-Band Bytestream: TimeOut reached for id %(sid)s [%(profile)s]")
+             % {"sid": sid, "profile": profile})
         self._killId(sid, False, "TIMEOUT", profile)
 
     def _killId(self, sid, success=False, failure_reason="UNKNOWN", profile=None):
--- a/src/plugins/plugin_xep_0065.py	Sun Sep 08 19:13:02 2013 +0200
+++ b/src/plugins/plugin_xep_0065.py	Thu Sep 05 20:57:00 2013 +0200
@@ -503,7 +503,8 @@
     def _timeOut(self, sid, profile):
         """Delecte current_stream id, called after timeout
         @param id: id of client.xep_0065_current_stream"""
-        info(_("Socks5 Bytestream: TimeOut reached for id %s [%s]") % (sid, profile))
+        info(_("Socks5 Bytestream: TimeOut reached for id %(sid)s [%(profile)s]")
+             % {"sid": sid, "profile": profile})
         self._killId(sid, False, "TIMEOUT", profile)
 
     def _killId(self, sid, success=False, failure_reason="UNKNOWN", profile=None):
--- a/src/plugins/plugin_xep_0096.py	Sun Sep 08 19:13:02 2013 +0200
+++ b/src/plugins/plugin_xep_0096.py	Thu Sep 05 20:57:00 2013 +0200
@@ -295,7 +295,8 @@
         return sid
 
     def sendSuccessCb(self, sid, file_obj, stream_method, profile):
-        info(_('Transfer %s successfuly finished [%s]') % (sid, profile))
+        info(_('Transfer %(sid)s successfuly finished [%(profile)s]')
+             % {"sid": sid, "profile": profile})
         file_obj.close()
 
     def sendFailureCb(self, sid, file_obj, stream_method, reason, profile):