]> git.phdru.name Git - xsetbg.git/commitdiff
Style: Fix `flake8` error E999 SyntaxError: Missing parens in 'print'
authorOleg Broytman <phd@phdru.name>
Sat, 24 Feb 2024 13:52:44 +0000 (16:52 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 24 Feb 2024 14:01:31 +0000 (17:01 +0300)
dump_db.py
print-filename.py
print-stats.py
reload_db.py
rescan_fs.py
xsetbg_conf.py
xsetbg_db.py

index ea6b0f16ea8e7254dbc2bca9dc1f9fe3cde4bb5b..97972991ba3169be555bb6dd1dbfe6dd7ff505fc 100755 (executable)
@@ -13,4 +13,4 @@ if not xsetbg_db:
     sys.exit("Error: no database found")
 
 for row in xsetbg_db.select(orderBy='-last_shown'):
-    print row.id, row.last_shown, row.full_name.encode(default_encoding)
+    print(row.id, row.last_shown, row.full_name.encode(default_encoding))
index 234d0a3741b88a77e9fa8c33ea6facb15e3e7f6e..921f129bbed512d21e1e6a229623e2bead4e6237 100755 (executable)
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
-"""Print background filename
+"""print(background filename)
 
-Print the filename of the current or previous background image.
+print(the filename of the current or previous background image.)
 
 This file is a part of XSetBg.
 
@@ -58,4 +58,4 @@ index, output_encoding = get_args()
 filename = xsetbg_db.select('last_shown IS NOT NULL',
                             orderBy='-last_shown')[index].full_name
 
-print filename.encode(output_encoding)
+print(filename.encode(output_encoding))
index 4e1770dddeef017a58546de6647990adad78eb6a..daa31a45e03c9035b96cfa6dae27829325dc5cf1 100755 (executable)
@@ -12,15 +12,15 @@ from xsetbg_db import xsetbg_db
 if not xsetbg_db:
     sys.exit("Error: no database found")
 
-print "Total files:", xsetbg_db.select().count()
-print "Images:", xsetbg_db.select('is_image = 1').count()
-print "Non-images:", xsetbg_db.select('is_image = 0').count()
-print "Unknown:", xsetbg_db.select('is_image IS NULL').count()
-print "Shown files:", xsetbg_db.select('last_shown IS NOT NULL').count()
-print "Not shown files:", xsetbg_db.select('last_shown IS NULL').count()
+print("Total files:", xsetbg_db.select().count())
+print("Images:", xsetbg_db.select('is_image = 1').count())
+print("Non-images:", xsetbg_db.select('is_image = 0').count())
+print("Unknown:", xsetbg_db.select('is_image IS NULL').count())
+print("Shown files:", xsetbg_db.select('last_shown IS NOT NULL').count())
+print("Not shown files:", xsetbg_db.select('last_shown IS NULL').count())
 last_shown = xsetbg_db.select('last_shown IS NOT NULL',
                               orderBy='last_shown')[0].last_shown
-print "Oldest:", asctime(localtime(last_shown))
+print("Oldest:", asctime(localtime(last_shown)))
 min_max = xsetbg_db.select().accumulateMany(('MIN', 'id'), ('MAX', 'id'))
-print "Min id:", min_max[0]
-print "Max id:", min_max[1]
+print("Min id:", min_max[0])
+print("Max id:", min_max[1])
index fe25e864781546343bd97233a1c87786913c161d..4a96a0195af2b24c0f5709dfa50dd20da752942b 100755 (executable)
@@ -55,6 +55,6 @@ with SQLiteMassInsert() as txn:
 
 dump_file.close()
 
-print "New images:", count_new
-print "Existing images:", count_old
-print "Updated images:", count_updated
+print("New images:", count_new)
+print("Existing images:", count_old)
+print("Updated images:", count_updated)
index 1b74f8f15213a4932f4e5326f134bf60e815183b..f2586f3651b9115600d3989ed8aeb28b335c9528 100755 (executable)
@@ -82,6 +82,6 @@ with SQLiteMassInsert() as txn:
     txn.query(query)
 
 NULL.close()
-print "New images:", count_new
-print "Existing images:", count_old
-print "Removed images:", count_del
+print("New images:", count_new)
+print("Existing images:", count_old)
+print("Removed images:", count_del)
index 1066bfa7e8ba8f46577e0044e45270fe831553f4..677b5371e38ea5cf107890520b730e8633d009e8 100755 (executable)
@@ -30,5 +30,5 @@ else:
     raise RuntimeError("Cannot find xsetbg.conf; searched %s", config_dirs)
 
 if __name__ == '__main__':
-    print "Config dirs:", config_dirs
-    print "Config file:", xsetbg_conf_file
+    print("Config dirs:", config_dirs)
+    print("Config file:", xsetbg_conf_file)
index dfa65fce7f307daaaac90c88daadb1143be63674..e64440ae7b045730e6adee16031b675455cdd1eb 100755 (executable)
@@ -88,5 +88,5 @@ else:
     xsetbg_db = None
 
 if __name__ == '__main__':
-    print "DB dirs:", db_dirs
-    print "DB file:", xsetbg_db_path
+    print("DB dirs:", db_dirs)
+    print("DB file:", xsetbg_db_path)