From e95ff58b95cd727148d2e829999cb50196a9fa73 Mon Sep 17 00:00:00 2001 From: Vaidas Gasiunas Date: Fri, 3 Mar 2023 14:00:59 +0100 Subject: [PATCH] Reformat symbolify.py --- bindings/c/symbolify.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bindings/c/symbolify.py b/bindings/c/symbolify.py index b0c9dece64..1e729a0d2d 100644 --- a/bindings/c/symbolify.py +++ b/bindings/c/symbolify.py @@ -1,14 +1,15 @@ -if __name__ == '__main__': +if __name__ == "__main__": import re import sys - r = re.compile('DLLEXPORT[^(]*(fdb_[^(]*)[(]') + + r = re.compile("DLLEXPORT[^(]*(fdb_[^(]*)[(]") header_files = sys.argv[1:-1] symbols_file = sys.argv[-1] symbols = set() for header_file in header_files: - with open(header_file, 'r') as f: - symbols.update('_' + m.group(1) for m in r.finditer(f.read())) + with open(header_file, "r") as f: + symbols.update("_" + m.group(1) for m in r.finditer(f.read())) symbols = sorted(symbols) - with open(symbols_file, 'w') as f: - f.write('\n'.join(symbols)) - f.write('\n') + with open(symbols_file, "w") as f: + f.write("\n".join(symbols)) + f.write("\n")