[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/ Removed trailing whitespace.

Gintautas Miliauskas gintas at pov.lt
Tue Feb 22 06:28:04 EST 2005


Log message for revision 29246:
  Removed trailing whitespace.
  

Changed:
  U   Zope3/trunk/src/zope/app/annotation/attribute.py
  U   Zope3/trunk/src/zope/app/container/contained.py
  U   Zope3/trunk/src/zope/app/container/interfaces.py
  U   Zope3/trunk/src/zope/app/container/sample.py
  U   Zope3/trunk/src/zope/app/copypastemove/__init__.py
  U   Zope3/trunk/src/zope/app/ftp/__init__.py
  U   Zope3/trunk/src/zope/app/homefolder/README.txt

-=-
Modified: Zope3/trunk/src/zope/app/annotation/attribute.py
===================================================================
--- Zope3/trunk/src/zope/app/annotation/attribute.py	2005-02-22 11:26:23 UTC (rev 29245)
+++ Zope3/trunk/src/zope/app/annotation/attribute.py	2005-02-22 11:28:03 UTC (rev 29246)
@@ -11,18 +11,15 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Attribute Annotations implementation 
+"""Attribute Annotations implementation
 
 $Id$
 """
 __docformat__ = 'restructuredtext'
 
 from UserDict import DictMixin
-
 from BTrees.OOBTree import OOBTree
-
 from zope.interface import implements
-
 from interfaces import IAnnotations, IAttributeAnnotatable
 
 
@@ -34,7 +31,7 @@
     __used_for__ = IAttributeAnnotatable
 
     def __init__(self, obj):
-        self.obj = obj        
+        self.obj = obj
 
     def __nonzero__(self):
         return bool(getattr(self.obj, '__annotations__', 0))
@@ -53,17 +50,16 @@
             raise KeyError, key
 
         return annotations[key]
-        
+
     def keys(self):
         annotations = getattr(self.obj, '__annotations__', None)
         if annotations is None:
             return []
 
         return annotations.keys()
-    
+
     def __setitem__(self, key, value):
         """See zope.app.annotation.interfaces.IAnnotations"""
-        
         try:
             annotations = self.obj.__annotations__
         except AttributeError:

Modified: Zope3/trunk/src/zope/app/container/contained.py
===================================================================
--- Zope3/trunk/src/zope/app/container/contained.py	2005-02-22 11:26:23 UTC (rev 29245)
+++ Zope3/trunk/src/zope/app/container/contained.py	2005-02-22 11:28:03 UTC (rev 29246)
@@ -127,7 +127,7 @@
          ...         ),
          ...       L(13),
          ...       )
-         
+
        Now, if we call the dispatcher, it should call event handlers
        for all of the objects.
 
@@ -146,7 +146,7 @@
          >>> ztapi.handle([None, IObjectMovedEvent], handler)
 
        We also register our dispatcher:
-       
+
          >>> ztapi.handle([None, IObjectMovedEvent], dispatchToSublocations)
 
        We can then call the dispatcher for the root object:
@@ -169,7 +169,7 @@
        This suggests that location event handlers need to be aware that
        the objects they are called on and the event objects could be
        different.
-       
+
        """
     subs = ISublocations(object, None)
     if subs is not None:
@@ -196,7 +196,7 @@
          >>> sublocations.sort()
          >>> sublocations
          [1, 2, 42]
-      
+
        """
 
     def __init__(self, container):
@@ -250,7 +250,7 @@
         True
         >>> item.__name__
         u'foo'
-    
+
     We don't get a new added event:
 
         >>> event
@@ -361,7 +361,7 @@
     This helper is needed, in part, because the events need to get
     published after the `object` has been added to the `container`.
 
-    If the item implements `IContained`, simply set it's `__parent__`
+    If the item implements `IContained`, simply set its `__parent__`
     and `__name__` attributes:
 
     >>> class IItem(zope.interface.Interface):
@@ -382,7 +382,7 @@
 
     >>> ztapi.handle([IItem, IObjectMovedEvent],
     ...              lambda obj, event: obj.setMoved(event))
-    
+
     >>> item = Item()
 
     >>> container = {}
@@ -560,7 +560,6 @@
     ValueError: empty names are not allowed
 
     """
-
     # Do basic name check:
     if isinstance(name, str):
         try:

Modified: Zope3/trunk/src/zope/app/container/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/container/interfaces.py	2005-02-22 11:26:23 UTC (rev 29245)
+++ Zope3/trunk/src/zope/app/container/interfaces.py	2005-02-22 11:28:03 UTC (rev 29246)
@@ -24,6 +24,7 @@
 from zope.app.location.interfaces import ILocation
 from zope.app.event.interfaces import IObjectEvent
 
+
 class DuplicateIDError(KeyError):
     pass
 
@@ -31,33 +32,32 @@
     """An error of a container with one of its components."""
 
 class InvalidContainerType(Invalid, TypeError):
-    """The type of a container is not valid
-    """
+    """The type of a container is not valid."""
 
 class InvalidItemType(Invalid, TypeError):
-    """The type of an item is not valid
-    """
+    """The type of an item is not valid."""
 
 class InvalidType(Invalid, TypeError):
-    """The type of an object is not valid
-    """
+    """The type of an object is not valid."""
 
+
+
 class IContained(ILocation):
-    """Objects contained in containers
-    """
+    """Objects contained in containers."""
 
+
 class IItemContainer(IItemMapping):
-    """Minimal readable container
-    """
+    """Minimal readable container."""
 
+
 class ISimpleReadContainer(IItemContainer, IReadMapping):
-    """Readable content containers
-    """
+    """Readable content containers."""
 
+
 class IReadContainer(ISimpleReadContainer, IEnumerableMapping):
-    """Readable containers that can be enumerated.
-    """
+    """Readable containers that can be enumerated."""
 
+
 class IWriteContainer(Interface):
     """An interface for the write aspects of a container."""
 
@@ -123,18 +123,21 @@
 
         """
 
+
 class IItemWriteContainer(IWriteContainer, IItemContainer):
     """A write container that also supports minimal reads."""
 
+
 class IContentContainer(IWriteContainer):
-    """Containers (like folders) that contain ordinary content"""
+    """Containers (like folders) that contain ordinary content."""
 
+
 class IContainer(IReadContainer, IWriteContainer):
     """Readable and writable content container."""
 
+
 class IOrderedContainer(IContainer):
-    """Containers whose contents are maintained in order
-    """
+    """Containers whose contents are maintained in order."""
 
     def updateOrder(order):
         """Revise the order of keys, replacing the current ordering.
@@ -148,22 +151,23 @@
         Raises ``ValueError`` if order contains an invalid set of keys.
         """
 
+
 class IContainerNamesContainer(IContainer):
-    """Containers that always choose names for their items
-    """
+    """Containers that always choose names for their items."""
 
 
 ##############################################################################
 # Moving Objects
 
 class IObjectMovedEvent(IObjectEvent):
-    """An object has been moved"""
+    """An object has been moved."""
 
     oldParent = Attribute("The old location parent for the object.")
     oldName = Attribute("The old location name for the object.")
     newParent = Attribute("The new location parent for the object.")
     newName = Attribute("The new location name for the object.")
 
+
 ##############################################################################
 # Adding objects
 
@@ -179,9 +183,11 @@
         return ("%(obj)s cannot be added "
                 "to %(container)s%(message)s" % self.__dict__)
 
+
 class IObjectAddedEvent(IObjectMovedEvent):
     """An object has been added to a container."""
 
+
 class IAdding(IView):
 
     def add(content):
@@ -217,7 +223,7 @@
         """Return whether names can be input by the user."""
 
     def addingInfo():
-        """Returns add menu data as a sequence of mappings.
+        """Return add menu data as a sequence of mappings.
 
         Each mapping contains 'action', 'title', and possibly other keys.
 
@@ -225,10 +231,10 @@
         """
 
     def isSingleMenuItem():
-        "Return whether there is single menu item or not."
-    
+        """Return whether there is single menu item or not."""
+
     def hasCustomAddView():
-       "This should be called only if there is `singleMenuItem` else return 0"
+        "This should be called only if there is `singleMenuItem` else return 0"
 
 
 class INameChooser(Interface):
@@ -236,7 +242,7 @@
     def checkName(name, object):
         """Check whether an object name is valid.
 
-        Raise a user error if the name is not valid.
+        Raises a user error if the name is not valid.
         """
 
     def chooseName(name, object):
@@ -244,16 +250,17 @@
 
         The given name and object may be taken into account when
         choosing the name.
-
         """
 
+
 ##############################################################################
 # Removing objects
 
 
 class IObjectRemovedEvent(IObjectMovedEvent):
-    """An object has been removed from a container"""
+    """An object has been removed from a container."""
 
+
 ##############################################################################
 # Finding objects
 
@@ -263,18 +270,19 @@
     """
 
     def find(id_filters=None, object_filters=None):
-        """Find object that matches all filters in all sub objects,
-        not including this container itself.
+        """Find object that matches all filters in all sub-objects.
+
+        This container itself is not included.
         """
 
+
 class IObjectFindFilter(Interface):
 
     def matches(object):
-        """Returns true if the object matches the filter criteria.
-        """
+        """Return True if the object matches the filter criteria."""
 
+
 class IIdFindFilter(Interface):
 
     def matches(id):
-        """Returns true if the id matches the filter criteria.
-        """
+        """Return True if the id matches the filter criteria."""

Modified: Zope3/trunk/src/zope/app/container/sample.py
===================================================================
--- Zope3/trunk/src/zope/app/container/sample.py	2005-02-22 11:26:23 UTC (rev 29245)
+++ Zope3/trunk/src/zope/app/container/sample.py	2005-02-22 11:28:03 UTC (rev 29246)
@@ -26,6 +26,7 @@
 from zope.interface import implements
 from zope.app.container.contained import Contained, setitem, uncontained
 
+
 class SampleContainer(Contained):
     """Sample container implementation suitable for testing.
 

Modified: Zope3/trunk/src/zope/app/copypastemove/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/copypastemove/__init__.py	2005-02-22 11:26:23 UTC (rev 29245)
+++ Zope3/trunk/src/zope/app/copypastemove/__init__.py	2005-02-22 11:28:03 UTC (rev 29246)
@@ -154,7 +154,7 @@
     ...     return True
     ...
     >>> class I2(zope.interface.Interface):
-    ...     __parent__ = zope.schema.Field(constraint = con1)
+    ...     __parent__ = zope.schema.Field(constraint=con1)
     ...
     >>> class constrainedObject(object):
     ...     zope.interface.implements(I2)
@@ -346,7 +346,7 @@
     ...     return True
     ...
     >>> class I2(zope.interface.Interface):
-    ...     __parent__ = zope.schema.Field(constraint = con1)
+    ...     __parent__ = zope.schema.Field(constraint=con1)
     ...
     >>> class constrainedObject(object):
     ...     zope.interface.implements(I2)

Modified: Zope3/trunk/src/zope/app/ftp/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/ftp/__init__.py	2005-02-22 11:26:23 UTC (rev 29245)
+++ Zope3/trunk/src/zope/app/ftp/__init__.py	2005-02-22 11:28:03 UTC (rev 29246)
@@ -34,6 +34,7 @@
 from zope.app.copypastemove.interfaces import IContainerItemRenamer
 from zope.app.container.interfaces import IContainer
 
+
 class FTPView(object):
     implements(IFTPPublisher)
 

Modified: Zope3/trunk/src/zope/app/homefolder/README.txt
===================================================================
--- Zope3/trunk/src/zope/app/homefolder/README.txt	2005-02-22 11:26:23 UTC (rev 29245)
+++ Zope3/trunk/src/zope/app/homefolder/README.txt	2005-02-22 11:28:03 UTC (rev 29246)
@@ -2,11 +2,11 @@
 Principal Home Folder
 =====================
 
-The principal home folder subscriber let's you assign home folders to
+The principal home folder subscriber lets you assign home folders to
 principals as you would do in any OS. This particular implementation of such a
 feature is intended as a demo of the power of the way to handle principals
 and not as the holy grail. If you have concerns about the assumptions made in
-this implementation (which are probably legitamite), just ignore this package
+this implementation (which are probably legitimate), just ignore this package
 altogether.
 
 Managing the Home Folders
@@ -141,12 +141,12 @@
 Accessing the Home Folder
 -------------------------
 
-But how does the home folder gets assigned to a principal? There are two ways
+But how does the home folder get assigned to a principal? There are two ways
 of accessing the homefolder. The first is via a simple adapter that provides a
 `homeFolder` attribute. The second method provides the folder via a path
 adapter called `homefolder`.
 
-Let's start by creatig a principal:
+Let's start by creating a principal:
 
   >>> from zope.security.interfaces import IPrincipal
   >>> from zope.interface import implements
@@ -178,8 +178,8 @@
   ...                 "homefolder") is baseFolder['stephan']
   True
 
-As you can see the path adapter just returns the homefolder. This way we can
-guarantee that always the folder's full API is available. Of course the real
+As you can see, the path adapter just returns the homefolder. This way we can
+guarantee that the folder's full API is always available. Of course the real
 way it will be used is via a TALES expression:
 
   Setup of the Engine



More information about the Zope3-Checkins mailing list