From: Oleg Broytman Date: Mon, 4 Sep 2023 17:00:36 +0000 (+0300) Subject: Style: Fix flake8 E305 expected 2 blank lines, found 1 X-Git-Tag: 5.0.0~83 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=90f66cf9ebfa461d9c1d3163d69f345b20fb8d03;p=bookmarks_db.git Style: Fix flake8 E305 expected 2 blank lines, found 1 After class or function definition. --- diff --git a/Robots/bkmk_rurllib.py b/Robots/bkmk_rurllib.py index 3ef47eb..0045f2d 100644 --- a/Robots/bkmk_rurllib.py +++ b/Robots/bkmk_rurllib.py @@ -78,6 +78,7 @@ class myftpwrapper(urllib_ftpwrapper): global ftpcache_key ftpcache_key = (user, host, port, '/'.join(dirs)) + urllib.ftpwrapper = myftpwrapper diff --git a/Writers/bkmk_whtml.py b/Writers/bkmk_whtml.py index eae6e5f..a9e46e8 100644 --- a/Writers/bkmk_whtml.py +++ b/Writers/bkmk_whtml.py @@ -20,6 +20,7 @@ def dump_comment(comment): comment = comment.replace("\n", "
\n") return comment + ind_s = " "*4 diff --git a/check_url.py b/check_url.py index 7b52c70..0d40ba9 100755 --- a/check_url.py +++ b/check_url.py @@ -19,6 +19,7 @@ class MyHTTP(HTTP): HTTP._setup(self, conn) self.set_debuglevel(1) + httplib.HTTP = MyHTTP from bkmk_objects import Bookmark diff --git a/parse_html/__main__.py b/parse_html/__main__.py index 61e04e0..34b891c 100644 --- a/parse_html/__main__.py +++ b/parse_html/__main__.py @@ -9,7 +9,7 @@ from .bkmk_parse_html import parse_filename __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2014-2017 PhiloSoft Design" +__copyright__ = "Copyright (C) 2014-2023 PhiloSoft Design" __license__ = "GNU GPL" @@ -31,5 +31,6 @@ def main(): print(" refresh:", parser.refresh) print(" icon :", parser.icon) + if __name__ == '__main__': main() diff --git a/robots.py b/robots.py index 2527a0c..84a3a2b 100644 --- a/robots.py +++ b/robots.py @@ -22,5 +22,6 @@ def import_robot(robot_name): exec("robot = bkmk_r%s.robot_%s" % (robot_name, robot_name)) return robot + robot = import_robot(robot_name) set_params(robot, robot_params) diff --git a/storage.py b/storage.py index 407fa24..c61d24c 100644 --- a/storage.py +++ b/storage.py @@ -22,5 +22,6 @@ def import_storage(storage_name): exec("storage = bkmk_st%s.storage_%s" % (storage_name, storage_name)) return storage + storage = import_storage(storage_name) set_params(storage, storage_params) diff --git a/writers.py b/writers.py index 3212e5a..8d85670 100644 --- a/writers.py +++ b/writers.py @@ -22,5 +22,6 @@ def import_writer(writer_name): exec("writer = bkmk_w%s.writer_%s" % (writer_name, writer_name)) return writer + writer = import_writer(writer_name) set_params(writer, writer_params)