templatefilters: stop using str as a variable name
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 02 Mar 2018 04:59:27 +0530
changeset 36552 a185b1af207c
parent 36551 98d4c642d7f2
child 36553 24897a9d18ac
templatefilters: stop using str as a variable name str() is an inbuilt function. Differential Revision: https://phab.mercurial-scm.org/D2531
mercurial/templatefilters.py
--- 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):