exthelper: simplify configitem registration
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 22 Dec 2018 22:26:36 -0500
changeset 4326 80fce30fd919
parent 4325 7f3c25791fe2
child 4327 9521698a9894
exthelper: simplify configitem registration
hgext3rd/evolve/exthelper.py
--- a/hgext3rd/evolve/exthelper.py	Thu Dec 27 21:26:17 2018 -0500
+++ b/hgext3rd/evolve/exthelper.py	Sat Dec 22 22:26:36 2018 -0500
@@ -11,7 +11,6 @@
 
 from mercurial import (
     commands,
-    configitems,
     extensions,
     fileset as filesetmod,
     registrar,
@@ -52,12 +51,7 @@
             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)