largefiles: don't use mutable default argument value
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Tue, 14 Mar 2017 23:49:10 -0700
changeset 31419 86dfd31c0329
parent 31418 dddc4812aa7a
child 31420 a53f2d4c734f
largefiles: don't use mutable default argument value Caught by pylint.
hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py	Tue Mar 14 23:48:25 2017 -0700
+++ b/hgext/largefiles/reposetup.py	Tue Mar 14 23:49:10 2017 -0700
@@ -272,7 +272,9 @@
         # contents updated to reflect the hash of their largefile.
         # Do that here.
         def commit(self, text="", user=None, date=None, match=None,
-                force=False, editor=False, extra={}):
+                force=False, editor=False, extra=None):
+            if extra is None:
+                extra = {}
             orig = super(lfilesrepo, self).commit
 
             with self.wlock():