Patchwork D633: wrapcommand: use functools.partial

login
register
mail settings
Submitter phabricator
Date Sept. 7, 2017, 10:08 p.m.
Message ID <0f91549879d3354d25bc1021375d4e35@localhost.localdomain>
Download mbox | patch
Permalink /patch/23737/
State Not Applicable
Headers show

Comments

phabricator - Sept. 7, 2017, 10:08 p.m.
quark updated this revision to Diff 1679.

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/extensions.py

CHANGE DETAILS




To: quark, #hg-reviewers, phillco
Cc: 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