Patchwork D633: wrapcommand: use functools.partial

login
register
mail settings
Submitter phabricator
Date Sept. 8, 2017, 4:21 a.m.
Message ID <8a2cfd47c823d08f587611b368312c50@localhost.localdomain>
Download mbox | patch
Permalink /patch/23740/
State Not Applicable
Headers show

Comments

phabricator - Sept. 8, 2017, 4:21 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa763c891f36e: wrapcommand: use functools.partial (authored by quark).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D633?vs=1679&id=1682

REVISION DETAIL
  https://phab.mercurial-scm.org/D633

AFFECTED FILES
  mercurial/extensions.py

CHANGE DETAILS




To: quark, #hg-reviewers, phillco
Cc: martinvonz, mercurial-devel

Patch

diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -377,7 +377,8 @@ 
             break
 
     origfn = entry[0]
-    wrap = bind(util.checksignature(wrapper), util.checksignature(origfn))
+    wrap = functools.partial(util.checksignature(wrapper),
+                             util.checksignature(origfn))
     _updatewrapper(wrap, origfn, wrapper)
     if docstring is not None:
         wrap.__doc__ += docstring