Patchwork D2531: templatefilters: stop using str as a variable name

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 12:56 a.m.
Message ID <da1ba86ac39079af4fb7a6c303923805@localhost.localdomain>
Download mbox | patch
Permalink /patch/28636/
State Not Applicable
Headers show

Comments

phabricator - March 2, 2018, 12:56 a.m.
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




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

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):