diff hgext/rebase.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 1703a7f9d5b8
children 61c1f29e7f4f
line wrap: on
line diff
--- a/hgext/rebase.py	Fri Nov 27 17:00:00 2020 -0500
+++ b/hgext/rebase.py	Fri Nov 27 17:03:29 2020 -0500
@@ -507,10 +507,10 @@
         ui.note(_(b'rebase merging completed\n'))
 
     def _concludenode(self, rev, editor, commitmsg=None):
-        '''Commit the wd changes with parents p1 and p2.
+        """Commit the wd changes with parents p1 and p2.
 
         Reuse commit info from rev but also store useful information in extra.
-        Return node of committed revision.'''
+        Return node of committed revision."""
         repo = self.repo
         ctx = repo[rev]
         if commitmsg is None:
@@ -1135,7 +1135,11 @@
             overrides = {(b'rebase', b'singletransaction'): True}
             with ui.configoverride(overrides, b'rebase'):
                 _origrebase(
-                    ui, repo, action, opts, rbsrt,
+                    ui,
+                    repo,
+                    action,
+                    opts,
+                    rbsrt,
                 )
         except error.ConflictResolutionRequired:
             ui.status(_(b'hit a merge conflict\n'))
@@ -1447,8 +1451,8 @@
 
 
 def commitmemorynode(repo, wctx, editor, extra, user, date, commitmsg):
-    '''Commit the memory changes with parents p1 and p2.
-    Return node of committed revision.'''
+    """Commit the memory changes with parents p1 and p2.
+    Return node of committed revision."""
     # By convention, ``extra['branch']`` (set by extrafn) clobbers
     # ``branch`` (used when passing ``--keepbranches``).
     branch = None
@@ -1475,8 +1479,8 @@
 
 
 def commitnode(repo, editor, extra, user, date, commitmsg):
-    '''Commit the wd changes with parents p1 and p2.
-    Return node of committed revision.'''
+    """Commit the wd changes with parents p1 and p2.
+    Return node of committed revision."""
     dsguard = util.nullcontextmanager()
     if not repo.ui.configbool(b'rebase', b'singletransaction'):
         dsguard = dirstateguard.dirstateguard(repo, b'rebase')
@@ -1965,11 +1969,11 @@
 
 
 def buildstate(repo, destmap, collapse):
-    '''Define which revisions are going to be rebased and where
+    """Define which revisions are going to be rebased and where
 
     repo: repo
     destmap: {srcrev: destrev}
-    '''
+    """
     rebaseset = destmap.keys()
     originalwd = repo[b'.'].rev()