[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/fssync/ Update doc strings to ReST

Phil Ruggera pruggera at san.rr.com
Sat Jul 24 02:10:42 EDT 2004


Log message for revision 26749:
  Update doc strings to ReST


Changed:
  U   Zope3/trunk/src/zope/app/fssync/browser/__init__.py
  U   Zope3/trunk/src/zope/app/fssync/committer.py
  U   Zope3/trunk/src/zope/app/fssync/fsbundle.py
  U   Zope3/trunk/src/zope/app/fssync/fspickle.py
  U   Zope3/trunk/src/zope/app/fssync/fsregistry.py
  U   Zope3/trunk/src/zope/app/fssync/interfaces.py
  U   Zope3/trunk/src/zope/app/fssync/main.py
  U   Zope3/trunk/src/zope/app/fssync/metaconfigure.py
  U   Zope3/trunk/src/zope/app/fssync/metadirectives.py
  U   Zope3/trunk/src/zope/app/fssync/syncer.py


-=-
Modified: Zope3/trunk/src/zope/app/fssync/browser/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/browser/__init__.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/browser/__init__.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -15,6 +15,8 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 import os
 import cgi
 import shutil
@@ -59,7 +61,7 @@
                 shutil.rmtree(dirname)
 
 class NewMetadata(Metadata):
-    """Subclass of Metadata that sets the 'added' flag in all entries."""
+    """Subclass of Metadata that sets the ``added`` flag in all entries."""
 
     def getentry(self, file):
         entry = Metadata.getentry(self, file)

Modified: Zope3/trunk/src/zope/app/fssync/committer.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/committer.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/committer.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -15,6 +15,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
 
 import os
 
@@ -43,7 +44,7 @@
 class Checker(object):
     """Check that the filesystem is consistent with the object database.
 
-    The public API consists of __init__(), check() and errors() only.
+    The public API consists of `__init__()`, `check()` and `errors()` only.
     """
 
     def __init__(self,
@@ -78,7 +79,7 @@
     def conflict(self, fspath):
         """Helper to report a conflict.
 
-        Conflicts can be retrieved by calling errors().
+        Conflicts can be retrieved by calling `errors()`.
         """
         if self.raise_on_conflicts:
             raise SynchronizationError(fspath)
@@ -89,10 +90,10 @@
         """Compare an object or object tree from the filesystem.
 
         If the originals on the filesystem are not uptodate, errors
-        are reported by calling conflict().
+        are reported by calling `conflict()`.
 
         Invalid object names are reported by raising
-        SynchronizationError.
+        ``SynchronizationError``.
         """
 
         if (os.sep in name or
@@ -199,10 +200,10 @@
     """Commit changes from the filesystem to the object database.
 
     The filesystem's originals must consistent with the object
-    database; this should be checked beforehand by a Checker instance
+    database; this should be checked beforehand by a `Checker` instance
     with the same arguments.
 
-    The public API consists of __init__() and synch() only.
+    The public API consists of `__init__()` and `synch()` only.
     """
 
     def __init__(self, getSerializer, metadata=None,
@@ -231,7 +232,7 @@
     def synch(self, container, name, fspath, context=None):
         """Synchronize an object or object tree from the filesystem.
 
-        SynchronizationError is raised for errors that can't be
+        ``SynchronizationError`` is raised for errors that can't be
         corrected by a update operation, including invalid object
         names.
         """

Modified: Zope3/trunk/src/zope/app/fssync/fsbundle.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/fsbundle.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/fsbundle.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -15,6 +15,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
 
 import os
 

Modified: Zope3/trunk/src/zope/app/fssync/fspickle.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/fspickle.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/fspickle.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -22,7 +22,7 @@
 pickle can be 'unpacked' with a new parent to create a copy in the new
 location; unpacking a pickle containing a parent reference requires
 passing an object to use as the parent as the second argument to the
-loads() function.  The name of the outermost object is not stored in
+`loads()` function.  The name of the outermost object is not stored in
 the pickle unless it is stored in the object.
 
 >>> from zope.app.location.tests import TLocation
@@ -61,6 +61,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
 
 import cPickle
 

Modified: Zope3/trunk/src/zope/app/fssync/fsregistry.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/fsregistry.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/fsregistry.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -17,6 +17,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
 
 from zope.exceptions import DuplicationError, NotFoundError
 from zope.interface import implements
@@ -41,7 +42,7 @@
 
         If no factory is registered for the given class, return the
         default factory, if one has been registered.  If no default
-        factory has been registered, raise NotFoundError.
+        factory has been registered, raise ``NotFoundError``.
         """
 
         factory = self._class_factory_reg.get(object.__class__)
@@ -53,7 +54,7 @@
 
 
     def provideSynchronizer(self,class_, factory):
-        """Set class_, factory into the dictionary."""
+        """Set `class_`, factory into the dictionary."""
         if class_ in self._class_factory_reg:
             raise DuplicationError
         else:

Modified: Zope3/trunk/src/zope/app/fssync/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/interfaces.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/interfaces.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -15,6 +15,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
 
 from zope.interface import Interface
 
@@ -23,14 +24,14 @@
     """Lookup file-system representation adapters."""
 
     def getSynchronizer(object):
-        """Return an object that implements IObjectEntry for the argument.
+        """Return an object that implements `IObjectEntry` for the argument.
 
         The return value may be:
 
-        - An IDirectoryEntry adapter for the object is returned if the
+        - An `IDirectoryEntry` adapter for the object is returned if the
           object is represented as a directory on the file system.
 
-        - An IFileEntry adapter for the object is returned if the
+        - An `IFileEntry` adapter for the object is returned if the
           object is represented as a file on the file system.
 
         or

Modified: Zope3/trunk/src/zope/app/fssync/main.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/main.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/main.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -24,6 +24,7 @@
 """
 $Id$
 """
+__docformat__ = 'restructuredtext'
 
 from zope.fssync.command import Command, Usage
 
@@ -33,10 +34,10 @@
 def main():
     """Main program.
 
-    The return value is the suggested sys.exit() status code:
-    0 or None for success
-    2 for command line syntax errors
-    1 or other for later errors
+    The return value is the suggested `sys.exit()` status code:
+    ``0`` or ``None`` for success
+    ``2`` for command line syntax errors
+    ``1`` or other for later errors
     """
     cmd = Command(usage=__doc__)
     for func, aliases, short, long in command_table:
@@ -54,7 +55,7 @@
 
     The contents of SOURCE are copied into the newly created bundle,
     and are scheduled for addition to the database.  The new bundle
-    can be manipulated using 'zsync add' and 'zsync revert' (and just
+    can be manipulated using ``zsync add`` and ``zsync revert`` (and just
     editing the contents) as needed before committing it to the
     database.
     """

Modified: Zope3/trunk/src/zope/app/fssync/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/metaconfigure.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/metaconfigure.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -15,10 +15,12 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 from zope.app.fssync.fsregistry import provideSynchronizer
 
 def registerFSRegistry(_context, class_=None, factory=None):
-    """registerFSRegistry method to register Class and Serializer factory
+    """`registerFSRegistry` method to register Class and Serializer factory
     associated with it.
     """
     _context.action(

Modified: Zope3/trunk/src/zope/app/fssync/metadirectives.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/metadirectives.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/metadirectives.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -16,6 +16,7 @@
 $Id$
 """
 __docformat__ = 'restructuredtext'
+
 from zope.configuration.fields import GlobalObject
 from zope.interface import Interface
 

Modified: Zope3/trunk/src/zope/app/fssync/syncer.py
===================================================================
--- Zope3/trunk/src/zope/app/fssync/syncer.py	2004-07-24 05:51:58 UTC (rev 26748)
+++ Zope3/trunk/src/zope/app/fssync/syncer.py	2004-07-24 06:10:42 UTC (rev 26749)
@@ -15,6 +15,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
 
 from zope.component import getService
 from zope.fssync.server.syncer import Syncer



More information about the Zope3-Checkins mailing list