# HG changeset patch # User Matt Harbison # Date 1545963977 18000 # Node ID 7f3c25791fe250a5c6013150d86a591ebb42af78 # Parent e913546b9d7921d3eadeb6194b5eee73d4567fd5 exthelper: avoid a [] default arg to wrapcommand() diff -r e913546b9d79 -r 7f3c25791fe2 hgext3rd/evolve/exthelper.py --- a/hgext3rd/evolve/exthelper.py Fri Jan 04 00:10:44 2019 -0500 +++ b/hgext3rd/evolve/exthelper.py Thu Dec 27 21:26:17 2018 -0500 @@ -281,7 +281,7 @@ return keyword return dec - def wrapcommand(self, command, extension=None, opts=[]): + def wrapcommand(self, command, extension=None, opts=None): """Decorated function is a command wrapper The name of the command must be given as the decorator argument. @@ -304,6 +304,8 @@ command. """ + if opts is None: + opts = [] def dec(wrapper): if extension is None: self._commandwrappers.append((command, wrapper, opts))