diff mercurial/cffi/bdiffbuild.py @ 43076:2372284d9457

formatting: blacken the codebase This is using my patch to black (https://github.com/psf/black/pull/826) so we don't un-wrap collection literals. Done with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S # skip-blame mass-reformatting only # no-check-commit reformats foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D6971
author Augie Fackler <augie@google.com>
date Sun, 06 Oct 2019 09:45:02 -0400
parents 0585337ea787
children 687b865b95ad
line wrap: on
line diff
--- a/mercurial/cffi/bdiffbuild.py	Sat Oct 05 10:29:34 2019 -0400
+++ b/mercurial/cffi/bdiffbuild.py	Sun Oct 06 09:45:02 2019 -0400
@@ -4,11 +4,14 @@
 import os
 
 ffi = cffi.FFI()
-with open(os.path.join(os.path.join(os.path.dirname(__file__), '..'),
-                       'bdiff.c')) as f:
-    ffi.set_source("mercurial.cffi._bdiff",
-                   f.read(), include_dirs=['mercurial'])
-ffi.cdef("""
+with open(
+    os.path.join(os.path.join(os.path.dirname(__file__), '..'), 'bdiff.c')
+) as f:
+    ffi.set_source(
+        "mercurial.cffi._bdiff", f.read(), include_dirs=['mercurial']
+    )
+ffi.cdef(
+    """
 struct bdiff_line {
     int hash, n, e;
     ssize_t len;
@@ -26,7 +29,8 @@
     struct bdiff_hunk *base);
 void bdiff_freehunks(struct bdiff_hunk *l);
 void free(void*);
-""")
+"""
+)
 
 if __name__ == '__main__':
     ffi.compile()