[pitivi] Documentation fixes



commit 4181e21a49b1576866ba50cee99d9eea17812729
Author: Edward Hervey <bilboed bilboed com>
Date:   Tue Feb 10 15:23:09 2009 +0100

    Documentation fixes
---
 pitivi/formatters/base.py   |    9 ++++++++-
 pitivi/formatters/format.py |   24 ++++++++++++------------
 2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/pitivi/formatters/base.py b/pitivi/formatters/base.py
index f938d73..e1d402d 100644
--- a/pitivi/formatters/base.py
+++ b/pitivi/formatters/base.py
@@ -31,7 +31,7 @@ class FormatterError(Exception):
 class FormatterLoadError(FormatterError):
     pass
 
-class FormatterSaveError(FormatterError):
+class FormatterStoreError(FormatterError):
     pass
 
 # FIXME : How do we handle interaction with the UI ??
@@ -42,8 +42,13 @@ class Formatter(object):
     """
     Provides convenience methods for storing and loading
     Project files.
+
+    @cvar description: Description of the formatter.
+    @type description: C{str}
     """
 
+    description = "Base formatter"
+
     def loadProject(self, location):
         """
         Loads the project from the given location.
@@ -83,4 +88,6 @@ class Formatter(object):
 
 class DefaultFormatter(Formatter):
 
+    description = "Default Formatter"
+
     pass
diff --git a/pitivi/formatters/format.py b/pitivi/formatters/format.py
index 9ada85a..d7cf9ce 100644
--- a/pitivi/formatters/format.py
+++ b/pitivi/formatters/format.py
@@ -23,14 +23,14 @@
 High-level tools for using Formatters
 """
 
-def load_project(location, formatter=None):
+def load_project(uri, formatter=None):
     """
     Load the project from the given location.
 
     If specified, use the given formatter.
 
-    @type location: L{str}
-    @param location: The location of the project. Needs to be an
+    @type uri: L{str}
+    @param uri: The location of the project. Needs to be an
     absolute URI.
     @type formatter: C{Formatter}
     @param formatter: If specified, try loading the project with that
@@ -38,9 +38,9 @@ def load_project(location, formatter=None):
     @raise FormatterLoadError: If the location couldn't be properly loaded.
     @return: The loaded C{Project}
     """
-    pass
+    raise NotImplementedError
 
-def save_project(project, location, formatter=None):
+def save_project(project, uri, formatter=None):
     """
     Save the C{Project} to the given location.
 
@@ -48,8 +48,8 @@ def save_project(project, location, formatter=None):
 
     @type project: C{Project}
     @param project: The C{Project} to save.
-    @type location: L{str}
-    @param location: The location to store the project to. Needs to
+    @type uri: L{str}
+    @param uri: The location to store the project to. Needs to
     be an absolute URI.
     @type formatter: C{Formatter}
     @param formatter: The C{Formatter} to use to store the project if specified.
@@ -58,16 +58,16 @@ def save_project(project, location, formatter=None):
     @return: Whether the file was successfully stored
     @rtype: L{bool}
     """
-    pass
+    raise NotImplementedError
 
-def can_handle_location(location):
+def can_handle_location(uri):
     """
     Detects whether the project at the given location can be loaded.
 
-    @type location: L{str}
-    @param location: The location of the project. Needs to be an
+    @type uri: L{str}
+    @param uri: The location of the project. Needs to be an
     absolute URI.
     @return: Whether the location contains a valid C{Project}.
     @rtype: L{bool}
     """
-    pass
+    raise NotImplementedError



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