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

Phil Ruggera pruggera at san.rr.com
Sat Jul 24 00:02:18 EDT 2004


Log message for revision 26745:
  Update doc strings to ReST


Changed:
  U   Zope3/trunk/src/zope/app/file/__init__.py
  U   Zope3/trunk/src/zope/app/file/browser/file.py
  U   Zope3/trunk/src/zope/app/file/browser/image.py
  U   Zope3/trunk/src/zope/app/file/file.py
  U   Zope3/trunk/src/zope/app/file/fssync/adapter.py
  U   Zope3/trunk/src/zope/app/file/image.py
  U   Zope3/trunk/src/zope/app/file/interfaces.py


-=-
Modified: Zope3/trunk/src/zope/app/file/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/file/__init__.py	2004-07-24 03:51:01 UTC (rev 26744)
+++ Zope3/trunk/src/zope/app/file/__init__.py	2004-07-24 04:02:18 UTC (rev 26745)
@@ -15,5 +15,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 from file import File
 from image import Image

Modified: Zope3/trunk/src/zope/app/file/browser/file.py
===================================================================
--- Zope3/trunk/src/zope/app/file/browser/file.py	2004-07-24 03:51:01 UTC (rev 26744)
+++ Zope3/trunk/src/zope/app/file/browser/file.py	2004-07-24 04:02:18 UTC (rev 26745)
@@ -15,6 +15,8 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 class FileView(object):
 
     def show(self):

Modified: Zope3/trunk/src/zope/app/file/browser/image.py
===================================================================
--- Zope3/trunk/src/zope/app/file/browser/image.py	2004-07-24 03:51:01 UTC (rev 26744)
+++ Zope3/trunk/src/zope/app/file/browser/image.py	2004-07-24 04:02:18 UTC (rev 26745)
@@ -15,6 +15,8 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 from zope.app.size import byteDisplay
 from zope.app.size.interfaces import ISized
 
@@ -30,18 +32,18 @@
             scale=0, xscale=0, yscale=0, css_class=None, **args):
         """
         Generate an HTML IMG tag for this image, with customization.
-        Arguments to self.tag() can be any valid attributes of an IMG tag.
-        'src' will always be an absolute pathname, to prevent redundant
+        Arguments to ``self.tag()`` can be any valid attributes of an IMG tag.
+        `src` will always be an absolute pathname, to prevent redundant
         downloading of images. Defaults are applied intelligently for
-        'height', 'width', and 'alt'. If specified, the 'scale', 'xscale',
-        and 'yscale' keyword arguments will be used to automatically adjust
+        `height`, `width`, and `alt`. If specified, the `scale`, `xscale`,
+        and `yscale` keyword arguments will be used to automatically adjust
         the output height and width values of the image tag.
 
         Since 'class' is a Python reserved word, it cannot be passed in
         directly in keyword arguments which is a problem if you are
-        trying to use 'tag()' to include a CSS class. The tag() method
-        will accept a 'css_class' argument that will be converted to
-        'class' in the output tag to work around this.
+        trying to use ``tag()`` to include a CSS class. The `tag()` method
+        will accept a `css_class` argument that will be converted to
+        ``class`` in the output tag to work around this.
         """
         if width is None:
             width = self.context.getImageSize()[0]

Modified: Zope3/trunk/src/zope/app/file/file.py
===================================================================
--- Zope3/trunk/src/zope/app/file/file.py	2004-07-24 03:51:01 UTC (rev 26744)
+++ Zope3/trunk/src/zope/app/file/file.py	2004-07-24 04:02:18 UTC (rev 26745)
@@ -15,6 +15,8 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 from persistent import Persistent
 from transaction import get_transaction
 from zope.interface import implements
@@ -208,7 +210,7 @@
         return
 
     def getSize(self):
-        '''See IFile'''
+        '''See `IFile`'''
         return self._size
 
     # See IFile.
@@ -216,7 +218,7 @@
 
 
 class FileChunk(Persistent):
-    # Wrapper for possibly large data
+    """Wrapper for possibly large data"""
 
     next = None
 

Modified: Zope3/trunk/src/zope/app/file/fssync/adapter.py
===================================================================
--- Zope3/trunk/src/zope/app/file/fssync/adapter.py	2004-07-24 03:51:01 UTC (rev 26744)
+++ Zope3/trunk/src/zope/app/file/fssync/adapter.py	2004-07-24 04:02:18 UTC (rev 26745)
@@ -15,6 +15,8 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 from zope.interface import implements
 from zope.fssync.server.entryadapter import ObjectEntryAdapter
 from zope.fssync.server.interfaces import IObjectFile

Modified: Zope3/trunk/src/zope/app/file/image.py
===================================================================
--- Zope3/trunk/src/zope/app/file/image.py	2004-07-24 03:51:01 UTC (rev 26744)
+++ Zope3/trunk/src/zope/app/file/image.py	2004-07-24 04:02:18 UTC (rev 26745)
@@ -15,6 +15,8 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 import struct
 from cStringIO import StringIO
 
@@ -32,7 +34,7 @@
     implements(IImage)
 
     def __init__(self, data=''):
-        '''See interface IFile'''
+        '''See interface `IFile`'''
         self.contentType, self._width, self._height = getImageInfo(data)
         self.data = data
 
@@ -44,7 +46,7 @@
             self.contentType = contentType
 
     def getImageSize(self):
-        '''See interface IImage'''
+        '''See interface `IImage`'''
         return (self._width, self._height)
 
     data = property(File._getData, _setData)
@@ -56,11 +58,11 @@
         self._image = image
 
     def sizeForSorting(self):
-        'See ISized'
+        '''See `ISized`'''
         return ('byte', self._image.getSize())
 
     def sizeForDisplay(self):
-        'See ISized'
+        '''See `ISized`'''
         w, h = self._image.getImageSize()
         if w < 0:
             w = '?'

Modified: Zope3/trunk/src/zope/app/file/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/file/interfaces.py	2004-07-24 03:51:01 UTC (rev 26744)
+++ Zope3/trunk/src/zope/app/file/interfaces.py	2004-07-24 04:02:18 UTC (rev 26745)
@@ -15,6 +15,8 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
+
 from zope.schema import BytesLine, Bytes
 from zope.interface import Interface
 from zope.app.i18n import ZopeMessageIDFactory as _



More information about the Zope3-Checkins mailing list