From a5a3a03d6067edaae395c8d5386257b55f3850f3 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 2 Sep 2023 18:06:10 +0300 Subject: [PATCH] Style: Fix flake8 E128 continuation line under-indented for visual indent --- Robots/bkmk_rforking.py | 14 ++++++++------ Storage/bkmk_stflad.py | 7 ++++--- Writers/bkmk_wflad.py | 12 +++++++----- bkmk_objects.py | 8 ++++---- bkmk_parser.py | 6 +++--- check_urls.py | 8 +++++--- 6 files changed, 31 insertions(+), 24 deletions(-) diff --git a/Robots/bkmk_rforking.py b/Robots/bkmk_rforking.py index cad8b2d..4d3e105 100644 --- a/Robots/bkmk_rforking.py +++ b/Robots/bkmk_rforking.py @@ -4,7 +4,7 @@ This file is a part of Bookmarks database and Internet robot. """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design" +__copyright__ = "Copyright (C) 2000-2023 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['robot_forking'] @@ -40,7 +40,7 @@ def restart_subp(log): stop_subp(log) check_subp = Subprocess("%s/Robots/bkmk_rforking_sub.py" % os.path.dirname(sys.argv[0]), - control_stderr=True) + control_stderr=True) subp_pipe = RecordFile(check_subp) @@ -73,10 +73,12 @@ class robot_forking(Robot): if check_subp.waitForPendingChar(60): # wait a minute new_b = pickle.loads(subp_pipe.read_record()) - for attr in ("error", "no_error", - "moved", "size", "md5", "real_title", - "last_tested", "last_modified", "test_time", - "icon", "icon_href"): + for attr in ( + "error", "no_error", + "moved", "size", "md5", "real_title", + "last_tested", "last_modified", "test_time", + "icon", "icon_href", + ): if hasattr(new_b, attr): setattr(bookmark, attr, getattr(new_b, attr)) else: diff --git a/Storage/bkmk_stflad.py b/Storage/bkmk_stflad.py index 5639772..2322291 100644 --- a/Storage/bkmk_stflad.py +++ b/Storage/bkmk_stflad.py @@ -113,9 +113,10 @@ Charset: %s if record.has_key("URL"): comment = record["Comment"].replace("\\n", '\n') - bookmark = Bookmark(record["URL"], record["AddDate"], - record["LastVisit"], record["LastModified"], - record["Keyword"], comment) + bookmark = Bookmark( + record["URL"], record["AddDate"], + record["LastVisit"], record["LastModified"], + record["Keyword"], comment) bookmark.name = record["Title"] self.current_folder.append(bookmark) diff --git a/Writers/bkmk_wflad.py b/Writers/bkmk_wflad.py index 06c523b..ad84a53 100644 --- a/Writers/bkmk_wflad.py +++ b/Writers/bkmk_wflad.py @@ -4,7 +4,7 @@ This file is a part of Bookmarks database and Internet robot. """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design" +__copyright__ = "Copyright (C) 2000-2023 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['writer_flad'] @@ -48,10 +48,12 @@ LastModified: %s Keyword: %s Comment: %s""" % (level+1, b.name, b.href, strftime(b.add_date), strftime(b.last_visit), strftime(b.last_modified), b.keyword, b.comment)) - for attr_name, attr_out in (("error", "Error"), ("no_error", "NoError"), - ("moved", "Moved"), ("size", "Size"), ("md5", "Md5"), - ("real_title", "RealTitle"), ("test_time", "TestTime"), - ("icon_href", "IconURI"), ("icon", "Icon"), ("charset", "Charset")): + for attr_name, attr_out in ( + ("error", "Error"), ("no_error", "NoError"), + ("moved", "Moved"), ("size", "Size"), ("md5", "Md5"), + ("real_title", "RealTitle"), ("test_time", "TestTime"), + ("icon_href", "IconURI"), ("icon", "Icon"), ("charset", "Charset"), + ): if hasattr(b, attr_name): value = getattr(b, attr_name) if isinstance(value, unicode): diff --git a/bkmk_objects.py b/bkmk_objects.py index 140cb98..4031e5f 100644 --- a/bkmk_objects.py +++ b/bkmk_objects.py @@ -9,8 +9,8 @@ __copyright__ = "Copyright (C) 2000-2023 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['Folder', 'Bookmark', 'Ruler', 'Walker', 'Writer', 'Robot', - 'InverseLinker', 'Linear', 'make_linear', 'make_tree', 'break_tree', - 'quote_title', 'unquote_title', 'parse_params', 'set_params', + 'InverseLinker', 'Linear', 'make_linear', 'make_tree', 'break_tree', + 'quote_title', 'unquote_title', 'parse_params', 'set_params', ] @@ -54,8 +54,8 @@ class Bookmark(object): isBookmark = 1 def __init__(self, href, add_date, last_visit=None, last_modified=None, - keyword=None, comment='', icon_href=None, icon=None, - charset=None, parser_charset=None): + keyword=None, comment='', icon_href=None, icon=None, + charset=None, parser_charset=None): protocol, request = urllib.splittype(href) user, password, port = None, None, None host, path = urllib.splithost(request) diff --git a/bkmk_parser.py b/bkmk_parser.py index 6a69433..329b4e5 100644 --- a/bkmk_parser.py +++ b/bkmk_parser.py @@ -4,7 +4,7 @@ This file is a part of Bookmarks database and Internet robot. """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 1997-2017 PhiloSoft Design" +__copyright__ = "Copyright (C) 1997-2023 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['BkmkParser'] @@ -149,8 +149,8 @@ class BkmkParser(HTMLParser): debug("Bookmark points to: `%s'" % href) bookmark = Bookmark(href, add_date, last_visit, last_modified, - keyword=keyword, icon=icon, - charset=charset, parser_charset=self.charset or default_encoding) + keyword=keyword, icon=icon, charset=charset, + parser_charset=self.charset or default_encoding) self.current_object = bookmark self.current_folder.append(bookmark) self.urls += 1 diff --git a/check_urls.py b/check_urls.py index ae7fe83..000141f 100755 --- a/check_urls.py +++ b/check_urls.py @@ -121,9 +121,11 @@ def run(): if checked.has_key(href): log("Already checked %s" % href) old_object = root_folder.linear[checked[href]] - for attr_name in ("last_visit", "last_modified", - "error", "no_error", "moved", "size", "md5", "real_title", - "last_tested", "test_time", "icon", "charset"): + for attr_name in ( + "last_visit", "last_modified", + "error", "no_error", "moved", "size", "md5", "real_title", + "last_tested", "test_time", "icon", "charset", + ): if hasattr(old_object, attr_name): setattr(object, attr_name, getattr(old_object, attr_name)) else: -- 2.39.5