Patchwork [2,of,7] convert: don't use mutable default argument value

login
register
mail settings
Submitter Pierre-Yves David
Date March 15, 2017, 7:01 a.m.
Message ID <910e63ee01566dad50ec.1489561274@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19349/
State Accepted
Headers show

Comments

Pierre-Yves David - March 15, 2017, 7:01 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1489560488 25200
#      Tue Mar 14 23:48:08 2017 -0700
# Node ID 910e63ee01566dad50ecb1691d2dc845d88a77be
# Parent  de882be93d6353919d59d9b0d5798db0d7e8a134
# 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 910e63ee0156
convert: don't use mutable default argument value

Caught by pylint.

Patch

diff --git a/hgext/convert/cvsps.py b/hgext/convert/cvsps.py
--- a/hgext/convert/cvsps.py
+++ b/hgext/convert/cvsps.py
@@ -622,7 +622,7 @@  def createchangeset(ui, log, fuzz=60, me
     # Sort changesets by date
 
     odd = set()
-    def cscmp(l, r, odd=odd):
+    def cscmp(l, r):
         d = sum(l.date) - sum(r.date)
         if d:
             return d