diff mercurial/cmdutil.py @ 47062:f38bf44e077f stable

black: make codebase compatible with black v21.4b2 and v20.8b1 I don't know what exact version of black made it care about these whitespace differences, but this is the version I got when I just installed it with `pip3 install black`. I'm intentionally not increasing the version of black required, as I don't want to force everyone to upgrade their version of black, and these fixes are backwards compatible with black v20.8b1. If there are more issues in the future and this becomes a maintenance burden I may do so in a future change. Tested with both versions of black (I got the older version via `pip3 install black==20.8b1`) Differential Revision: https://phab.mercurial-scm.org/D10539
author Kyle Lippincott <spectral@google.com>
date Fri, 30 Apr 2021 16:13:02 -0700
parents d9531094cf8e
children bea4717415c0
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue May 04 13:28:42 2021 -0400
+++ b/mercurial/cmdutil.py	Fri Apr 30 16:13:02 2021 -0700
@@ -326,7 +326,7 @@
 
 
 def checknotesize(ui, opts):
-    """ make sure note is of valid format """
+    """make sure note is of valid format"""
 
     note = opts.get(b'note')
     if not note:
@@ -972,7 +972,7 @@
 
 
 def changebranch(ui, repo, revs, label, opts):
-    """ Change the branch name of given revs to label """
+    """Change the branch name of given revs to label"""
 
     with repo.wlock(), repo.lock(), repo.transaction(b'branches'):
         # abort in case of uncommitted merge or dirty wdir
@@ -1108,7 +1108,7 @@
 
 
 def logmessage(ui, opts):
-    """ get the log message according to -m and -l option """
+    """get the log message according to -m and -l option"""
 
     check_at_most_one_arg(opts, b'message', b'logfile')
 
@@ -3920,7 +3920,7 @@
 
 
 def hgabortgraft(ui, repo):
-    """ abort logic for aborting graft using 'hg abort'"""
+    """abort logic for aborting graft using 'hg abort'"""
     with repo.wlock():
         graftstate = statemod.cmdstate(repo, b'graftstate')
         return abortgraft(ui, repo, graftstate)