diff hgext/transplant.py @ 45942:89a2afe31e82

formating: upgrade to black 20.8b1 This required a couple of small tweaks to un-confuse black, but now it works. Big formatting changes come from: * Dramatically improved collection-splitting logic upstream * Black having a strong (correct IMO) opinion that """ is better than ''' Differential Revision: https://phab.mercurial-scm.org/D9430
author Augie Fackler <raf@durin42.com>
date Fri, 27 Nov 2020 17:03:29 -0500
parents 527ce85c2e60
children 59fa3890d40a
line wrap: on
line diff
--- a/hgext/transplant.py	Fri Nov 27 17:00:00 2020 -0500
+++ b/hgext/transplant.py	Fri Nov 27 17:03:29 2020 -0500
@@ -62,10 +62,14 @@
 configitem = registrar.configitem(configtable)
 
 configitem(
-    b'transplant', b'filter', default=None,
+    b'transplant',
+    b'filter',
+    default=None,
 )
 configitem(
-    b'transplant', b'log', default=None,
+    b'transplant',
+    b'log',
+    default=None,
 )
 
 
@@ -140,8 +144,8 @@
         self.getcommiteditor = getcommiteditor
 
     def applied(self, repo, node, parent):
-        '''returns True if a node is already an ancestor of parent
-        or is parent or has already been transplanted'''
+        """returns True if a node is already an ancestor of parent
+        or is parent or has already been transplanted"""
         if hasnode(repo, parent):
             parentrev = repo.changelog.rev(parent)
         if hasnode(repo, node):
@@ -682,7 +686,7 @@
     helpcategory=command.CATEGORY_CHANGE_MANAGEMENT,
 )
 def transplant(ui, repo, *revs, **opts):
-    '''transplant changesets from another branch
+    """transplant changesets from another branch
 
     Selected changesets will be applied on top of the current working
     directory with the log of the original changeset. The changesets
@@ -731,7 +735,7 @@
     If a changeset application fails, you can fix the merge by hand
     and then resume where you left off by calling :hg:`transplant
     --continue/-c`.
-    '''
+    """
     with repo.wlock():
         return _dotransplant(ui, repo, *revs, **opts)
 
@@ -743,9 +747,9 @@
                 yield node
 
     def transplantwalk(repo, dest, heads, match=util.always):
-        '''Yield all nodes that are ancestors of a head but not ancestors
+        """Yield all nodes that are ancestors of a head but not ancestors
         of dest.
-        If no heads are specified, the heads of repo will be used.'''
+        If no heads are specified, the heads of repo will be used."""
         if not heads:
             heads = repo.heads()
         ancestors = []
@@ -886,8 +890,7 @@
 
 @revsetpredicate(b'transplanted([set])')
 def revsettransplanted(repo, subset, x):
-    """Transplanted changesets in set, or all transplanted changesets.
-    """
+    """Transplanted changesets in set, or all transplanted changesets."""
     if x:
         s = revset.getset(repo, subset, x)
     else: