695233cc2503

Fix a few things from pylint.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 26 Aug 2009 18:38:48 -0400
parents 8ddf5e7a78ad
children 39710f3be8cf
branches/tags (none)
files t.py

Changes

--- a/t.py	Wed Aug 26 18:34:46 2009 -0400
+++ b/t.py	Wed Aug 26 18:38:48 2009 -0400
@@ -7,11 +7,14 @@
 
 
 class InvalidTaskfile(Exception):
-    pass
-class AmbiguousPrefix(Exception):
+    """Raised when the path to a task file already exists as a directory."""
     pass
 
-_hash = lambda s: hashlib.sha1(s).hexdigest()
+class AmbiguousPrefix(Exception):
+    """Raised when trying to use a prefix that could identify multiple tasks."""
+    pass
+
+
 def _hash(s):
     """Return a hash of the given string for use as an id.
     
@@ -61,7 +64,7 @@
 
 
 class TaskDict(object):
-    """A set tasks, both finished and unfinished for a given list.
+    """A set of tasks, both finished and unfinished, for a given list.
     
     The list's files are read from disk when the TaskDict is initialized. They
     can be written back out to disk with the write() function.
@@ -135,6 +138,7 @@
                     tfile.write('%s | %s\n' % (task['text'], meta_str))
     
 
+
 def build_parser():
     parser = OptionParser()