changeset 43730:15cccbacd5ce

doc: don't use mutable default arguments It appears our mutable default arguments checker doesn't find arguments not on the first line of a function definition :( The arguments aren't used, so the default value is irrelevant. I found this when blackening this script in a future commit. Differential Revision: https://phab.mercurial-scm.org/D7445
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 16 Nov 2019 11:59:22 -0800
parents f7d7f9d23a7a
children 47ef023d0165
files doc/runrst
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/doc/runrst	Thu Nov 14 21:58:36 2019 -0800
+++ b/doc/runrst	Sat Nov 16 11:59:22 2019 -0800
@@ -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()