Patchwork [2,of,6,V2] exthelper: simplify configitem registration

login
register
mail settings
Submitter Matt Harbison
Date Dec. 23, 2018, 6:15 a.m.
Message ID <9c6e437729b7da29d5ee.1545545747@Envy>
Download mbox | patch
Permalink /patch/37327/
State Accepted
Headers show

Comments

Matt Harbison - Dec. 23, 2018, 6:15 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1545535596 18000
#      Sat Dec 22 22:26:36 2018 -0500
# Node ID 9c6e437729b7da29d5ee3d3b680a7810314b9d93
# Parent  ffab2010329f111c2237ebbb64be650a1b0301d8
exthelper: simplify configitem registration

Patch

diff --git a/mercurial/exthelper.py b/mercurial/exthelper.py
--- a/mercurial/exthelper.py
+++ b/mercurial/exthelper.py
@@ -54,12 +54,7 @@  class exthelper(object):
             self.command._doregister = _newdoregister
 
         self.configtable = {}
-        self._configitem = registrar.configitem(self.configtable)
-
-    def configitem(self, section, config, default=configitems.dynamicdefault):
-        """Register a config item.
-        """
-        self._configitem(section, config, default=default)
+        self.configitem = registrar.configitem(self.configtable)
 
     def merge(self, other):
         self._uicallables.extend(other._uicallables)