Mercurial > public > mercurial-scm > hg
comparison mercurial/templatefilters.py @ 16686:67964cda8701
cleanup: "not x in y" -> "x not in y"
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Sat, 12 May 2012 16:00:57 +0200 |
parents | e5788269741a |
children | e2711975be00 |
comparison
equal
deleted
inserted
replaced
16685:43d55088415a | 16686:67964cda8701 |
---|---|
258 >>> person('Foo "buz" Bar <foo@bar>') | 258 >>> person('Foo "buz" Bar <foo@bar>') |
259 'Foo "buz" Bar' | 259 'Foo "buz" Bar' |
260 >>> person('"Foo Bar <foo@bar>') | 260 >>> person('"Foo Bar <foo@bar>') |
261 'Foo Bar' | 261 'Foo Bar' |
262 """ | 262 """ |
263 if not '@' in author: | 263 if '@' not in author: |
264 return author | 264 return author |
265 f = author.find('<') | 265 f = author.find('<') |
266 if f != -1: | 266 if f != -1: |
267 return author[:f].strip(' "').replace('\\"', '"') | 267 return author[:f].strip(' "').replace('\\"', '"') |
268 f = author.find('@') | 268 f = author.find('@') |