[d-feet/pygi] Remove extra spaces in docstrings



commit cac70b8aff4d1a6a1dacd683c3057d07ca5885bb
Author: Thomas Bechtold <thomasbechtold jpberlin de>
Date:   Tue Oct 9 19:49:06 2012 +0200

    Remove extra spaces in docstrings

 dfeet/DFeetApp.py                |   18 +++++++++---------
 dfeet/_ui/executemethoddialog.py |    2 +-
 dfeet/bus_watch.py               |   16 ++++++++--------
 dfeet/introspection.py           |   12 ++++++------
 dfeet/introspection_helper.py    |   12 ++++++------
 dfeet/settings.py                |    2 +-
 tests/tests.py                   |   20 ++++++++++----------
 7 files changed, 41 insertions(+), 41 deletions(-)
---
diff --git a/dfeet/DFeetApp.py b/dfeet/DFeetApp.py
index 1a6cfe4..6e88c1d 100644
--- a/dfeet/DFeetApp.py
+++ b/dfeet/DFeetApp.py
@@ -78,19 +78,19 @@ class DFeetApp:
 
 
     def __systembus_connect_cb(self, action):
-        """ connect to system bus """
+        """connect to system bus"""
         bw = BusWatch(Gio.BusType.SYSTEM)
         self.__notebook_append_page(bw.paned_buswatch, "System Bus")
 
 
     def __sessionbus_connect_cb(self, action):
-        """ connect to session bus """
+        """connect to session bus"""
         bw = BusWatch(Gio.BusType.SESSION)
         self.__notebook_append_page(bw.paned_buswatch, "Session Bus")
 
 
     def __otherbus_connect_cb(self, action):
-        """ connect to other bus """
+        """connect to other bus"""
         dialog = AddConnectionDialog(self.main_window, self.bus_history)
         result = dialog.run()
         if result == Gtk.ResponseType.OK:
@@ -117,32 +117,32 @@ class DFeetApp:
         dialog.destroy()
 
     def __action_about_activate_cb(self, action):
-        """ show the about dialog """
+        """show the about dialog"""
         self.about_dialog.set_visible(True)
         self.about_dialog.run()
         self.about_dialog.set_visible(False)
 
 
     def __notebook_append_page(self, widget, text):
-        """ add a page to the notebook """
+        """add a page to the notebook"""
         ntl = NotebookTabLabel(text)
         page_nbr = self.notebook.append_page(widget, ntl)
         ntl.connect("close-clicked", self.__notebook_page_close_clicked_cb, widget)
 
 
     def __notebook_page_close_clicked_cb(self, button, widget):
-        """ remove a page from the notebook """
+        """remove a page from the notebook"""
         nbr = self.notebook.page_num(widget)
         self.notebook.remove_page(nbr)
 
 
     def __close_cb(self, action):
-        """ quit program """
+        """quit program"""
         self.__quit_dfeet(self.main_window, None)
 
 
     def __quit_dfeet(self, main_window, event):
-        """ quit d-feet application and store some settings """
+        """quit d-feet application and store some settings"""
         settings = Settings.get_instance()
         size = main_window.get_size()
         pos = main_window.get_position() 
@@ -158,7 +158,7 @@ class DFeetApp:
 
 
     def run(self):
-        """ start the application """
+        """start the application"""
         #add a System- and Session Bus tab
         self.__systembus_connect_cb(None)
         self.__sessionbus_connect_cb(None)
diff --git a/dfeet/_ui/executemethoddialog.py b/dfeet/_ui/executemethoddialog.py
index 564303f..d7e525e 100644
--- a/dfeet/_ui/executemethoddialog.py
+++ b/dfeet/_ui/executemethoddialog.py
@@ -85,7 +85,7 @@ class ExecuteMethodDialog:
 
 
     def method_connection_bus_cb(self, proxy, res_async, user_data):
-        """ async callback for executed method """
+        """async callback for executed method"""
         try:
             #get the result from the dbus method call
             result = proxy.call_finish(res_async)
diff --git a/dfeet/bus_watch.py b/dfeet/bus_watch.py
index 6b90706..1264adb 100644
--- a/dfeet/bus_watch.py
+++ b/dfeet/bus_watch.py
@@ -7,7 +7,7 @@ from introspection import AddressInfo
 
 
 class DBusBusName(GObject.GObject):
-    """ class to represent a name on the bus """
+    """class to represent a name on the bus"""
     def __init__(self, bus_name_unique):
         super(DBusBusName, self).__init__()
         self.__bus_name_unique = bus_name_unique
@@ -47,7 +47,7 @@ class DBusBusName(GObject.GObject):
 
 
 class BusWatch:
-    """ watch for a given bus """
+    """watch for a given bus"""
     def __init__(self, address):
         self.address = address
         #setup UI
@@ -108,7 +108,7 @@ class BusWatch:
 
 
     def __tree_view_cursor_changed_cb(self, treeview):
-        """ do something when a row is selected """
+        """do something when a row is selected"""
         selection = self.treeview.get_selection()
         if selection:
             model, iter = selection.get_selected()
@@ -137,7 +137,7 @@ class BusWatch:
             
 
     def __liststore_model_add(self, bus_name_obj):
-        """ add a DBusBusName object to the liststore model """
+        """add a DBusBusName object to the liststore model"""
         #update bus info stuff
         self.bus_proxy.GetConnectionUnixProcessID('(s)', bus_name_obj.bus_name_unique, 
                                                   result_handler = self.__get_unix_process_id_cb,
@@ -148,14 +148,14 @@ class BusWatch:
 
 
     def __liststore_model_remove(self, bus_name_obj):
-        """ remove a DBusBusName object to the liststore model """
+        """remove a DBusBusName object to the liststore model"""
         for n, obj in enumerate(self.liststore_model):
             if obj[2] == bus_name_obj.bus_name_unique:
                 del(self.liststore_model[n])
                 break
     
     def __liststore_model_get(self, bus_name_obj):
-        """ get a object from the liststore """
+        """get a object from the liststore"""
         for n, obj in enumerate(self.liststore_model):
             if obj[2] == bus_name_obj.bus_name_unique:
                 return obj
@@ -163,7 +163,7 @@ class BusWatch:
 
 
     def __name_owner_changed_cb(self, connection, sender_name, object_path, interface_name, signal_name, parameters, user_data):
-        """ bus name added or removed """
+        """bus name added or removed"""
         bus_name = parameters[0]
         old_owner = parameters[1]
         new_owner = parameters[2]
@@ -202,7 +202,7 @@ class BusWatch:
 
 
 if __name__ == "__main__":
-    """ for debugging """
+    """for debugging"""
     import sys
     import argparse
 
diff --git a/dfeet/introspection.py b/dfeet/introspection.py
index b68d2e2..c22e0cd 100644
--- a/dfeet/introspection.py
+++ b/dfeet/introspection.py
@@ -77,7 +77,7 @@ class AddressInfo():
 
 
     def __treeview_cursor_changed_cb(self, treeview):
-        """ do something when a row is selected """
+        """do something when a row is selected"""
         selection = self.__treeview.get_selection()
         if selection:
             model, iter = selection.get_selected()
@@ -119,7 +119,7 @@ class AddressInfo():
 
 
     def introspect_start(self):
-        """ introspect the given bus name and update the tree model """
+        """introspect the given bus name and update the tree model"""
         #cleanup current tree model
         self.__treemodel.clear()
         #start introspection
@@ -127,12 +127,12 @@ class AddressInfo():
 
 
     def __button_reload_clicked_cb(widget, address_info):
-        """ reload the introspection data """
+        """reload the introspection data"""
         address_info.introspect_start()
 
 
     def __dbus_node_introspect_cb(self, connection, result_async, object_path):
-        """ callback when Introspect dbus function call finished """
+        """callback when Introspect dbus function call finished"""
         try:
             res = connection.call_finish(result_async)
         except Exception, e:
@@ -204,7 +204,7 @@ class AddressInfo():
 
 
     def __dbus_node_introspect(self, object_path):
-        """ Introspect the given object path. This function will be called recursive """
+        """Introspect the given object path. This function will be called recursive"""
         #start spinner
         self.__spinner.start()
         self.__spinner.set_visible(True)
@@ -215,7 +215,7 @@ class AddressInfo():
 
 
 if __name__ == "__main__":
-    """ for debugging """
+    """for debugging"""
     import sys
     import argparse
 
diff --git a/dfeet/introspection_helper.py b/dfeet/introspection_helper.py
index d7214eb..bc77631 100644
--- a/dfeet/introspection_helper.py
+++ b/dfeet/introspection_helper.py
@@ -13,7 +13,7 @@ def args_name_markup(arg_name):
 
 
 class DBusNode(GObject.GObject):
-    """ object to represent a DBus Node (object path) """
+    """object to represent a DBus Node (object path)"""
     def __init__(self, name, object_path, node_info):
         GObject.GObject.__init__(self)
         self.__name = name
@@ -37,7 +37,7 @@ class DBusNode(GObject.GObject):
 
 
 class DBusInterface(DBusNode):
-    """ object to represent a DBus Interface """
+    """object to represent a DBus Interface"""
     def __init__(self, dbus_node_obj, iface_info):
         DBusNode.__init__(self, dbus_node_obj.name, dbus_node_obj.object_path, dbus_node_obj.node_info)
         self.__iface_info = iface_info # Gio.GDBusInterfaceInfo object
@@ -51,7 +51,7 @@ class DBusInterface(DBusNode):
 
 
 class DBusProperty(DBusInterface):
-    """ object to represent a DBus Property """
+    """object to represent a DBus Property"""
     def __init__(self, dbus_iface_obj, property_info):
         DBusInterface.__init__(self, dbus_iface_obj, dbus_iface_obj.iface_info)
         self.__property_info = property_info # Gio.GDBusPropertyInfo object
@@ -103,7 +103,7 @@ class DBusProperty(DBusInterface):
 
 
 class DBusSignal(DBusInterface):
-    """ object to represent a DBus Signal """
+    """object to represent a DBus Signal"""
     def __init__(self, dbus_iface_obj, signal_info):
         DBusInterface.__init__(self, dbus_iface_obj, dbus_iface_obj.iface_info)
         self.__signal_info = signal_info #Gio.GDBusSignalInfo object
@@ -137,7 +137,7 @@ class DBusSignal(DBusInterface):
 
 
 class DBusMethod(DBusInterface):
-    """ object to represent a DBus Method """
+    """object to represent a DBus Method"""
     def __init__(self, dbus_iface_obj, method_info):
         DBusInterface.__init__(self, dbus_iface_obj, dbus_iface_obj.iface_info)
         self.__method_info = method_info #Gio.GDBusMethodInfo object
@@ -202,7 +202,7 @@ class DBusMethod(DBusInterface):
         return result[0:-2]
 
     def __args_markup_str(self, args):
-        """ markup a given list of args """
+        """markup a given list of args"""
         result = ''
         result += '<span foreground="#FF00FF">(</span>'
         result += ', '.join('%s %s' % (args_signature_markup(arg['signature']), args_name_markup(arg['name'])) for arg in args)
diff --git a/dfeet/settings.py b/dfeet/settings.py
index 35edfe3..81cf94e 100644
--- a/dfeet/settings.py
+++ b/dfeet/settings.py
@@ -116,7 +116,7 @@ class Settings:
 
     @classmethod
     def get_instance(cls):
-        """ This class is a singlton so use this method to get it """
+        """This class is a singlton so use this method to get it"""
         if cls.instance:
             return cls.instance
 
diff --git a/tests/tests.py b/tests/tests.py
index bb6659d..63f6ca0 100755
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -26,21 +26,21 @@ XML = """
 """
 
 class IntrospectionHelperTest(unittest.TestCase):
-    """ tests for the introspection helper classes """
+    """tests for the introspection helper classes"""
     def setUp(self):
         self.name = "org.gnome.d-feet"
         self.object_path = "/org/gnome/d-feet"
         self.node_info = Gio.DBusNodeInfo.new_for_xml(XML)
 
     def test_dbus_node_info(self):
-        """ test DBusNode class """
+        """test DBusNode class"""
         obj_node = DBusNode(self.name, self.object_path, self.node_info)
         self.assertEqual(obj_node.name, self.name)
         self.assertEqual(obj_node.object_path, self.object_path)
         self.assertEqual(len(obj_node.node_info.interfaces), 1)
 
     def test_dbus_interface(self):
-        """ test DBusInterface class """
+        """test DBusInterface class"""
         obj_node = DBusNode(self.name, self.object_path, self.node_info)
         obj_iface = DBusInterface(obj_node, obj_node.node_info.interfaces[0])
         self.assertEqual(obj_iface.name, self.name)
@@ -50,7 +50,7 @@ class IntrospectionHelperTest(unittest.TestCase):
         self.assertEqual(len(obj_iface.iface_info.signals), 1)
 
     def test_dbus_property(self):
-        """ test DBusProperty class """
+        """test DBusProperty class"""
         obj_node = DBusNode(self.name, self.object_path, self.node_info)
         obj_iface = DBusInterface(obj_node, obj_node.node_info.interfaces[0])
         obj_prop = DBusProperty(obj_iface, obj_iface.iface_info.properties[0])
@@ -58,7 +58,7 @@ class IntrospectionHelperTest(unittest.TestCase):
         self.assertEqual(obj_prop.object_path, self.object_path)
 
     def test_dbus_signal(self):
-        """ test DBusSignal class """
+        """test DBusSignal class"""
         obj_node = DBusNode(self.name, self.object_path, self.node_info)
         obj_iface = DBusInterface(obj_node, obj_node.node_info.interfaces[0])
         obj_sig = DBusSignal(obj_iface, obj_iface.iface_info.signals[0])
@@ -67,25 +67,25 @@ class IntrospectionHelperTest(unittest.TestCase):
 
 
 class AddressInfoTest(unittest.TestCase):
-    """ tests for the AddressInfo class and the introspection stuff """
+    """tests for the AddressInfo class and the introspection stuff"""
 
     def test_system_bus(self):
-        """ introspect a name on the system bus """
+        """introspect a name on the system bus"""
         ai = AddressInfo(Gio.BusType.SYSTEM, "org.freedesktop.DBus")
 
     def test_session_bus(self):
-        """ introspect a name on the session bus """
+        """introspect a name on the session bus"""
         ai = AddressInfo(Gio.BusType.SESSION, "org.freedesktop.DBus")
 
     @unittest.skip("TODO: create another bus and test with the other bus")
     def test_other_bus(self):
-        """ test another bus """
+        """test another bus"""
         sysbus_addr = os.getenv("DBUS_SYSTEM_BUS_ADDRESS")
         ai = AddressInfo(sysbus_addr, "org.freedesktop.DBus")
     
     @unittest.skip("TODO:peer to peer test not implemented")
     def test_peer_to_peer(self):
-        """ test a p2p connection """
+        """test a p2p connection"""
         #TODO: setup a gdbus server and test a peer to peer connection
         #(see http://developer.gnome.org/gio/unstable/GDBusServer.html#gdbus-peer-to-peer)
         pass



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]