From: jlgijsbers Date: Sun, 16 Nov 2003 20:01:16 +0000 (+0000) Subject: Small readability improvements. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;ds=sidebyside;h=caa552b8a7babe7c5b6080bdb1ce36a6f7c22b08;p=roundup.git Small readability improvements. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1997 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py index 26a6c90..6cb47d9 100644 --- a/roundup/hyperdb.py +++ b/roundup/hyperdb.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: hyperdb.py,v 1.93 2003-11-16 19:59:10 jlgijsbers Exp $ +# $Id: hyperdb.py,v 1.94 2003-11-16 20:01:16 jlgijsbers Exp $ """ Hyperdatabase implementation, especially field types. @@ -230,8 +230,8 @@ All methods except __repr__ must be implemented by a concrete backend Database. raise NotImplementedError def addnode(self, classname, nodeid, node): - '''Add the specified node to its class's db. - ''' + """Add the specified node to its class's db. + """ raise NotImplementedError def serialise(self, classname, node): @@ -598,12 +598,12 @@ def convertLinkValue(db, propname, prop, value, idre=re.compile('\d+')): return value def fixNewlines(text): - ''' Homogenise line endings. + """ Homogenise line endings. Different web clients send different line ending values, but other systems (eg. email) don't necessarily handle those line endings. Our solution is to convert all line endings to LF. - ''' + """ text = text.replace('\r\n', '\n') return text.replace('\r', '\n') diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 60c8fe4..4bd6f85 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.94 2003-11-16 19:59:09 jlgijsbers Exp $ +# $Id: roundupdb.py,v 1.95 2003-11-16 20:01:16 jlgijsbers Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -150,7 +150,7 @@ class IssueClass: # Make sure we don't send mail to either the anonymous # user or a user who has already seen the message. return (userid and - self.db.user.get(userid, 'username') != 'anonymous' and + (self.db.user.get(userid, 'username') != 'anonymous') and not seen_message.has_key(userid)) # possibly send the message to the author, as long as they aren't