Commits

Patrick Mézard committed 0fc4add

obsolete: fix docstrings

Comments (0)

Files changed (1)

hgext/obsolete.py

 class exthelper(object):
     """Helper for modular extension setup
 
-    A single helper should be intanciated for each extension. Helper method are
-    then used as decorator for various purpose.
+    A single helper should be instanciated for each extension. Helper
+    methods are then used as decorator for various purpose.
 
-    All decorator returns the original function and may be chained.
+    All decorators return the original function and may be chained.
     """
 
     def __init__(self):
         self._duckpunchers = []
 
     def final_uisetup(self, ui):
-        """Method to be used as a the extension uisetup
+        """Method to be used as the extension uisetup
 
         The following operations belong here:
 
           objects created after this, and in particular the ui that will be
           passed to runcommand
         - Command wraps (extensions.wrapcommand)
-        - Changes that need to be visible by other extensions: because
+        - Changes that need to be visible to other extensions: because
           initialization occurs in phases (all extensions run uisetup, then all
-          run extsetup), a change made here will be visible by other extensions
+          run extsetup), a change made here will be visible to other extensions
           during extsetup
-        - Monkeypatches or function wraps (extensions.wrapfunction) of dispatch
+        - Monkeypatch or wrap function (extensions.wrapfunction) of dispatch
           module members
         - Setup of pre-* and post-* hooks
         - pushkey setup
 
         The following operations belong here:
 
-        - Changes depending on the status of other extensions. (if extensions.find('mq'))
+        - Changes depending on the status of other extensions. (if
+          extensions.find('mq'))
         - Add a global option to all commands
-        - Extend revsets 
+        - Register revset functions
         """
         knownexts = {}
         for name, symbol in self._revsetsymbols:
         If the second option `extension` argument is provided, the wrapping
         will be applied in the extension commandtable. This argument must be a
         string that will be searched using `extension.find` if not found and
-        Abort error is raised. If the wrapping apply to an extension, it is
+        Abort error is raised. If the wrapping applies to an extension, it is
         installed during `extsetup`
 
         example::
     def wrapfunction(self, container, funcname):
         """Decorated function is a function wrapper
 
-        This function take two argument, the container and the name of the
+        This function takes two arguments, the container and the name of the
         function to wrap. The wrapping is performed during `uisetup`.
-        (there is don't support extension)
+        (there is no extension support)
 
         example::
 
     def addattr(self, container, funcname):
         """Decorated function is to be added to the container
 
-        This function take two argument, the container and the name of the
+        This function takes two arguments, the container and the name of the
         function to wrap. The wrapping is performed during `uisetup`.
 
         example::
 
 @cachefor('obsolete')
 def _computeobsoleteset(repo):
-    """the set of obsolete revision"""
+    """the set of obsolete revisions"""
     obs = set()
     nm = repo.changelog.nodemap
     for prec in repo.obsstore.precursors:
 
 @cachefor('unstable')
 def _computeunstableset(repo):
-    """the set of non obsolete revision with obsolete parent"""
+    """the set of non obsolete revisions with obsolete parents"""
     return set(repo.revs('(obsolete()::) - obsolete()'))
 
 @cachefor('suspended')
 def _computesuspendedset(repo):
-    """the set of obsolete parent with non obsolete descendant"""
+    """the set of obsolete parents with non obsolete descendants"""
     return set(repo.revs('obsolete() and obsolete()::unstable()'))
 
 @cachefor('extinct')
 def _computeextinctset(repo):
-    """the set of obsolete parent without non obsolete descendant"""
+    """the set of obsolete parents without non obsolete descendants"""
     return set(repo.revs('obsolete() - obsolete()::unstable()'))
 
 @eh.wrapfunction(obsolete.obsstore, '__init__')
 def _initobsstorecache(orig, obsstore, *args, **kwargs):
-    """add a caches attributes to obsstore"""
+    """add a cache attribute to obsstore"""
     obsstore.caches = {}
     return orig(obsstore, *args, **kwargs)