Mercurial > public > mercurial-scm > hg-stable
diff hgext/lfs/blobstore.py @ 45957: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 | 234001d22ba6 |
children | 59fa3890d40a |
line wrap: on
line diff
--- a/hgext/lfs/blobstore.py Fri Nov 27 17:00:00 2020 -0500 +++ b/hgext/lfs/blobstore.py Fri Nov 27 17:03:29 2020 -0500 @@ -96,8 +96,7 @@ class lfsuploadfile(httpconnectionmod.httpsendfile): - """a file-like object that supports keepalive. - """ + """a file-like object that supports keepalive.""" def __init__(self, ui, filename): super(lfsuploadfile, self).__init__(ui, filename, b'rb') @@ -258,9 +257,9 @@ def _urlerrorreason(urlerror): - '''Create a friendly message for the given URLError to be used in an + """Create a friendly message for the given URLError to be used in an LfsRemoteError message. - ''' + """ inst = urlerror if isinstance(urlerror.reason, Exception): @@ -338,7 +337,10 @@ ] requestdata = pycompat.bytesurl( json.dumps( - {'objects': objects, 'operation': pycompat.strurl(action),} + { + 'objects': objects, + 'operation': pycompat.strurl(action), + } ) ) url = b'%s/objects/batch' % self.baseurl