D2531: templatefilters: stop using str as a variable name
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Fri Mar 2 00:56:14 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGde41b8a1e012: templatefilters: stop using str as a variable name (authored by pulkit, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2531?vs=6307&id=6310
REVISION DETAIL
https://phab.mercurial-scm.org/D2531
AFFECTED FILES
mercurial/templatefilters.py
CHANGE DETAILS
diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
--- a/mercurial/templatefilters.py
+++ b/mercurial/templatefilters.py
@@ -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):
To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list