diff MoinMoin/events/__init__.py @ 5280:d25574af97eb

event package: fix PEP8, c&p errors, trivial code changes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 15 Nov 2009 10:23:51 +0100
parents 2aa43685e17b
children 50251583a7bb
line wrap: on
line diff
--- a/MoinMoin/events/__init__.py	Sun Nov 15 10:08:13 2009 +0100
+++ b/MoinMoin/events/__init__.py	Sun Nov 15 10:23:51 2009 +0100
@@ -165,6 +165,7 @@
         Event.__init__(self, request)
         self.jid = jid
 
+
 class JabberIDUnsetEvent(Event):
     """ Sent when Jabber ID is no longer used
 
@@ -176,6 +177,7 @@
         Event.__init__(self, request)
         self.jid = jid
 
+
 class UserCreatedEvent(Event):
     """ Sent when a new user has been created """
 
@@ -187,12 +189,11 @@
         Event.__init__(self, request)
         self.user = user
 
+
 class PagePreSaveEvent(Event):
     """ Event sent when a page is about to be saved
 
-    This can be used to abort a save, for instance,
-    if handler returns
-
+    This can be used to abort a save, for instance, if handler returns Abort.
     """
 
     name = u"PagePreSaveEvent"
@@ -207,6 +208,7 @@
     """ This is a base class for messages passed from event handlers """
     pass
 
+
 class Abort(EventResult):
     """ Result returned if handler wants to abort operation that sent the event """
     def __init__(self, reason):
@@ -219,11 +221,10 @@
 def get_handlers(cfg):
     """Create a list of available event handlers.
 
-    Each handler is a handle() function defined in an plugin,
+    Each handler is a handle() function defined in a plugin,
     pretty much like in case of actions.
 
     TODO: maybe make it less dumb? ;-)
-
     """
     event_handlers = []
     names = wikiutil.getPlugins("events", cfg)
@@ -262,6 +263,7 @@
 
     return msg
 
+
 def get_subscribable_events():
     """Create and return a list of user-visible events
 
@@ -279,3 +281,4 @@
 
 # Get rid of the dummy getText so that it doesn't get imported with *
 del _
+