diff mercurial/revsetlang.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 18489e26d9a0
children 59fa3890d40a
line wrap: on
line diff
--- a/mercurial/revsetlang.py	Fri Nov 27 17:00:00 2020 -0500
+++ b/mercurial/revsetlang.py	Fri Nov 27 17:03:29 2020 -0500
@@ -83,7 +83,7 @@
 
 
 def tokenize(program, lookup=None, syminitletters=None, symletters=None):
-    '''
+    """
     Parse a revset statement into a stream of tokens
 
     ``syminitletters`` is the set of valid characters for the initial
@@ -102,7 +102,7 @@
     >>> list(tokenize(b"@::"))
     [('symbol', '@', 0), ('::', None, 1), ('end', None, 3)]
 
-    '''
+    """
     if not isinstance(program, bytes):
         raise error.ProgrammingError(
             b'revset statement must be bytes, got %r' % program
@@ -621,8 +621,7 @@
 
 
 def foldconcat(tree):
-    """Fold elements to be concatenated by `##`
-    """
+    """Fold elements to be concatenated by `##`"""
     if not isinstance(tree, tuple) or tree[0] in (
         b'string',
         b'symbol',
@@ -742,7 +741,7 @@
 
 
 def formatspec(expr, *args):
-    '''
+    """
     This is a convenience function for using revsets internally, and
     escapes arguments appropriately. Aliases are intentionally ignored
     so that intended expression behavior isn't accidentally subverted.
@@ -777,7 +776,7 @@
     "sort((:), 'desc', 'user')"
     >>> formatspec(b'%ls', [b'a', b"'"])
     "_list('a\\\\x00\\\\'')"
-    '''
+    """
     parsed = _parseargs(expr, args)
     ret = []
     for t, arg in parsed: