Mercurial > hg
changeset 36552:a185b1af207c
templatefilters: stop using str as a variable name
str() is an inbuilt function.
Differential Revision: https://phab.mercurial-scm.org/D2531
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 02 Mar 2018 04:59:27 +0530 |
parents | 98d4c642d7f2 |
children | 24897a9d18ac |
files | mercurial/templatefilters.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templatefilters.py Thu Mar 01 18:15:58 2018 -0500 +++ b/mercurial/templatefilters.py Fri Mar 02 04:59:27 2018 +0530 @@ -264,9 +264,9 @@ return encoding.lower(text) @templatefilter('nonempty') -def nonempty(str): +def nonempty(text): """Any text. Returns '(none)' if the string is empty.""" - return str or "(none)" + return text or "(none)" @templatefilter('obfuscate') def obfuscate(text):