mq: remove a mutable default argument
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 24 Sep 2015 00:50:06 -0700
changeset 26345 2aa0dde846b4
parent 26344 cd9cc7f30427
child 26346 2449a0a6ebda
mq: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs. The underlying function already handle "None" as an option value, so we do not need to do anything else.
hgext/mq.py
--- a/hgext/mq.py	Thu Sep 24 00:49:02 2015 -0700
+++ b/hgext/mq.py	Thu Sep 24 00:50:06 2015 -0700
@@ -483,7 +483,7 @@
         self.guardsdirty = False
         self.activeguards = None
 
-    def diffopts(self, opts={}, patchfn=None):
+    def diffopts(self, opts=None, patchfn=None):
         diffopts = patchmod.diffopts(self.ui, opts)
         if self.gitmode == 'auto':
             diffopts.upgrade = True