# HG changeset patch # User Steve Losh # Date 1251326328 14400 # Node ID 695233cc2503440253b19f84216f7da0e718ce35 # Parent 8ddf5e7a78ad0d2dac77ecc3df3707887d920190 Fix a few things from pylint. diff -r 8ddf5e7a78ad -r 695233cc2503 t.py --- 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()