changeset 6302:6f865bfc5fb8

exthelper: update examples and docstrings from the upstream version
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 11 Aug 2022 11:11:06 +0400
parents a649e0e36de7
children 1c78d704bea4
files hgext3rd/evolve/exthelper.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/exthelper.py	Thu Aug 11 11:08:45 2022 +0400
+++ b/hgext3rd/evolve/exthelper.py	Thu Aug 11 11:11:06 2022 +0400
@@ -153,7 +153,7 @@
             c(ui)
 
     def finalextsetup(self, ui):
-        """Method to be used as a the extension extsetup
+        """Method to be used as the extension extsetup
 
         The following operations belong here:
 
@@ -199,7 +199,7 @@
 
             @eh.uisetup
             def setupbabar(ui):
-                print 'this is uisetup!'
+                print('this is uisetup!')
         """
         self._uicallables.append(call)
         return call
@@ -211,7 +211,7 @@
 
             @eh.uipopulate
             def setupfoo(ui):
-                print 'this is uipopulate!'
+                print('this is uipopulate!')
         """
         self._uipopulatecallables.append(call)
         return call
@@ -223,7 +223,7 @@
 
             @eh.extsetup
             def setupcelestine(ui):
-                print 'this is extsetup!'
+                print('this is extsetup!')
         """
         self._extcallables.append(call)
         return call
@@ -235,7 +235,7 @@
 
             @eh.reposetup
             def setupzephir(ui, repo):
-                print 'this is reposetup!'
+                print('this is reposetup!')
         """
         self._repocallables.append(call)
         return call
@@ -292,8 +292,8 @@
 
         example::
 
-            @eh.function(discovery, 'checkheads')
-            def wrapfunction(orig, *args, **kwargs):
+            @eh.wrapfunction(discovery, 'checkheads')
+            def wrapcheckheads(orig, *args, **kwargs):
                 ui.note('His head smashed in and his heart cut out')
                 return orig(*args, **kwargs)
         """