From: Oleg Broytman Date: Mon, 4 Sep 2023 16:59:18 +0000 (+0300) Subject: Style: Fix flake8 E303 too many blank lines X-Git-Tag: 5.0.0~84 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=d7a67c44edee1994505e3bf501e6af63ffd1ef36;p=bookmarks_db.git Style: Fix flake8 E303 too many blank lines --- diff --git a/bkmk2db.py b/bkmk2db.py index 58031c0..483c0a5 100755 --- a/bkmk2db.py +++ b/bkmk2db.py @@ -42,7 +42,6 @@ def run(): else: filename = 'bookmarks.html' # good name both for DOS (bookmark.htm) and UNIX - if report_stats: from storage import storage_name sys.stdout.write("Converting %s to %s: " % (filename, storage_name)) @@ -64,7 +63,6 @@ def run(): print(filename, ": no such file") sys.exit(1) - if show_pbar: pbar = ttyProgressBar(0, size) lng = 0 @@ -75,7 +73,6 @@ def run(): else: dos_add = 0 # UNIX' and Mac's len() counts CR or LF correct - infile = open(filename, 'r') parser = BkmkParser() diff --git a/check_dups.py b/check_dups.py index 94ae3f0..7fca79a 100755 --- a/check_dups.py +++ b/check_dups.py @@ -69,7 +69,6 @@ def run(): if report_stats: print("Ok") - dup_dict = {} for object_no in range(objects): @@ -82,7 +81,6 @@ def run(): else: dup_dict[href] = object_no - if log_filename: log_file.close() diff --git a/check_title.py b/check_title.py index 775679b..870d968 100755 --- a/check_title.py +++ b/check_title.py @@ -50,7 +50,6 @@ def run(): if report_stats: print("Ok") - for object_no in range(objects): object = root_folder.linear[object_no] @@ -73,7 +72,6 @@ def run(): print("NO REAL TITLE!!!") print() - if report_stats: print(objects, "objects passed") diff --git a/db2bkmk.py b/db2bkmk.py index da9bf52..04b923f 100755 --- a/db2bkmk.py +++ b/db2bkmk.py @@ -60,7 +60,6 @@ def run(): sys.stdout.write("Writing %s: " % output_filename) sys.stdout.flush() - if transl: new_ext = str(transl) transl_d = {} @@ -95,7 +94,6 @@ def run(): root_folder.walk_depth(Transl(transl_d)) - outfile = open(output_filename, 'w') root_folder.walk_depth(writer(outfile, prune)) outfile.close() diff --git a/set-real_title.py b/set-real_title.py index a97a421..8f09137 100755 --- a/set-real_title.py +++ b/set-real_title.py @@ -9,7 +9,7 @@ import sys __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2002-2017 PhiloSoft Design" +__copyright__ = "Copyright (C) 2002-2023 PhiloSoft Design" __license__ = "GNU GPL" @@ -28,7 +28,7 @@ def run(): pass if report_stats: - print("Broytman set-real_title, Copyright (C) 2003-2017 PhiloSoft Design") + print("Broytman set-real_title, Copyright (C) 2003-2023 PhiloSoft Design") if args: sys.stderr.write("set-real_title: too many arguments\n") @@ -50,7 +50,6 @@ def run(): if report_stats: print("Ok") - changed = 0 for object_no in range(objects): object = root_folder.linear[object_no] @@ -66,7 +65,6 @@ def run(): object.name = real_title changed += 1 - if changed and report_stats: sys.stdout.write("Saving %s: " % storage.filename) sys.stdout.flush() diff --git a/set-title-list.py b/set-title-list.py index be96b53..52c5ee8 100755 --- a/set-title-list.py +++ b/set-title-list.py @@ -66,7 +66,6 @@ def run(): title_list_file.close() - from storage import storage storage = storage() @@ -82,7 +81,6 @@ def run(): if report_stats: print("Ok") - # Run through the list of objects and check URLs/titles changed = 0 for object_no in range(objects): @@ -96,7 +94,6 @@ def run(): object.name = name changed += 1 - if changed and report_stats: sys.stdout.write("Saving %s: " % storage.filename) sys.stdout.flush()