Mercurial > hg
diff mercurial/wireprotov2server.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 | a61287a95dc3 |
children | 14ff4929ca8c |
line wrap: on
line diff
--- a/mercurial/wireprotov2server.py Fri Nov 27 17:00:00 2020 -0500 +++ b/mercurial/wireprotov2server.py Fri Nov 27 17:03:29 2020 -0500 @@ -982,7 +982,10 @@ b'revisions': { b'type': b'list', b'example': [ - {b'type': b'changesetexplicit', b'nodes': [b'abcdef...'],} + { + b'type': b'changesetexplicit', + b'nodes': [b'abcdef...'], + } ], }, b'fields': { @@ -1166,14 +1169,20 @@ b'default': lambda: False, b'example': True, }, - b'nodes': {b'type': b'list', b'example': [b'0123456...'],}, + b'nodes': { + b'type': b'list', + b'example': [b'0123456...'], + }, b'fields': { b'type': b'set', b'default': set, b'example': {b'parents', b'revision'}, b'validvalues': {b'parents', b'revision', b'linknode'}, }, - b'path': {b'type': b'bytes', b'example': b'foo.txt',}, + b'path': { + b'type': b'bytes', + b'example': b'foo.txt', + }, }, permission=b'pull', # TODO censoring a file revision won't invalidate the cache. @@ -1262,7 +1271,10 @@ b'revisions': { b'type': b'list', b'example': [ - {b'type': b'changesetexplicit', b'nodes': [b'abcdef...'],} + { + b'type': b'changesetexplicit', + b'nodes': [b'abcdef...'], + } ], }, }, @@ -1375,7 +1387,12 @@ @wireprotocommand( b'listkeys', - args={b'namespace': {b'type': b'bytes', b'example': b'ns',},}, + args={ + b'namespace': { + b'type': b'bytes', + b'example': b'ns', + }, + }, permission=b'pull', ) def listkeysv2(repo, proto, namespace): @@ -1390,7 +1407,12 @@ @wireprotocommand( b'lookup', - args={b'key': {b'type': b'bytes', b'example': b'foo',},}, + args={ + b'key': { + b'type': b'bytes', + b'example': b'foo', + }, + }, permission=b'pull', ) def lookupv2(repo, proto, key): @@ -1415,7 +1437,10 @@ @wireprotocommand( b'manifestdata', args={ - b'nodes': {b'type': b'list', b'example': [b'0123456...'],}, + b'nodes': { + b'type': b'list', + b'example': [b'0123456...'], + }, b'haveparents': { b'type': b'bool', b'default': lambda: False, @@ -1427,7 +1452,10 @@ b'example': {b'parents', b'revision'}, b'validvalues': {b'parents', b'revision'}, }, - b'tree': {b'type': b'bytes', b'example': b'',}, + b'tree': { + b'type': b'bytes', + b'example': b'', + }, }, permission=b'pull', cachekeyfn=makecommandcachekeyfn(b'manifestdata', 1, allargs=True), @@ -1485,10 +1513,22 @@ @wireprotocommand( b'pushkey', args={ - b'namespace': {b'type': b'bytes', b'example': b'ns',}, - b'key': {b'type': b'bytes', b'example': b'key',}, - b'old': {b'type': b'bytes', b'example': b'old',}, - b'new': {b'type': b'bytes', b'example': b'new',}, + b'namespace': { + b'type': b'bytes', + b'example': b'ns', + }, + b'key': { + b'type': b'bytes', + b'example': b'key', + }, + b'old': { + b'type': b'bytes', + b'example': b'old', + }, + b'new': { + b'type': b'bytes', + b'example': b'new', + }, }, permission=b'push', )