Changeset: 70da166f08dd for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/70da166f08dd
Modified Files:
        testing/listexports.py.in
Branch: default
Log Message:

Modernize slightly.


diffs (32 lines):

diff --git a/testing/listexports.py.in b/testing/listexports.py.in
--- a/testing/listexports.py.in
+++ b/testing/listexports.py.in
@@ -48,9 +48,9 @@ def extract(f):
         pos = res.end(0)
         decl = res.group('decl')
         if '{' in decl:
-            sys.stderr.write('export on definition:\n%s\n' % res.group(0))
+            print(f'export on definition:\n{res.group(0)}', file=sys.stderr)
         elif '"hidden"' in decl:
-            sys.stderr.write('cannot export hidden function\n%s\n' % 
res.group(0))
+            print(f'cannot export hidden function:\n{res.group(0)}', 
file=sys.stderr)
         else:
             decl = exportutils.normalize(decl)
             res = nmere.search(decl)
@@ -92,14 +92,14 @@ def listexports():
         dirs = dirlist[lib]
         dl = [os.path.join(srcdir, d) for d in dirs]
         decls = findfiles(dl, skipfiles = skipfiles, skipdirs = skipdirs)
-        output.append('# %s\n' % lib)
+        output.append(f'# {lib}\n')
         for d in decls:
             output.append(d + '\n')
         output.append('\n')
     return output
 
 def main():
-    sys.stdout.writelines(listexports())
+    print(*listexports(), sep='', end='')
 
 if __name__ == '__main__':
     main()
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to