Patchwork D7445: doc: don't use mutable default arguments

login
register
mail settings
Submitter phabricator
Date Nov. 18, 2019, 4:50 p.m.
Message ID <ee2b904b1a04bed3aa82f58ed3956128@localhost.localdomain>
Download mbox | patch
Permalink /patch/43332/
State Not Applicable
Headers show

Comments

phabricator - Nov. 18, 2019, 4:50 p.m.
Closed by commit rHG15cccbacd5ce: doc: don&#039;t use mutable default arguments (authored by indygreg).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7445?vs=18196&id=18213

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7445/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7445

AFFECTED FILES
  doc/runrst

CHANGE DETAILS




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

Patch

diff --git a/doc/runrst b/doc/runrst
--- a/doc/runrst
+++ b/doc/runrst
@@ -27,8 +27,7 @@ 
                      "http://docutils.sourceforge.net/\n")
     sys.exit(-1)
 
-def role_hg(name, rawtext, text, lineno, inliner,
-            options={}, content=[]):
+def role_hg(name, rawtext, text, lineno, inliner, options=None, content=None):
     text = "hg " + utils.unescape(text)
     linktext = nodes.literal(rawtext, text)
     parts = text.split()