[PATCH 4 of 7] largefiles: don't use mutable default argument value
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Mar 15 03:01:16 EDT 2017
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1489560550 25200
# Tue Mar 14 23:49:10 2017 -0700
# Node ID 92e6b5422e92f0ad7707289335d9d40fb7c7da98
# Parent b8d26aeff6a637b61cac05d5b8710bfc1a120f06
# EXP-Topic check-pylint
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
# hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 92e6b5422e92
largefiles: don't use mutable default argument value
Caught by pylint.
diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -272,7 +272,9 @@ def reposetup(ui, repo):
# 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():
More information about the Mercurial-devel
mailing list