diff --git a/pacman_mirrors/graphicalui.py b/pacman_mirrors/graphicalui.py index f0bdb05aaf3e5f57db8ae202d0f8b912fdd83716..6e55d38261d32849a30186749767b29f39333f32 100644 --- a/pacman_mirrors/graphicalui.py +++ b/pacman_mirrors/graphicalui.py @@ -87,7 +87,8 @@ class GraphicalUI(Gtk.Window): self.button_done = Gtk.Button(txt.I_CONFIRM, sensitive=False) self.button_done.connect("clicked", self.done) - grid = Gtk.Grid(column_homogeneous=True, column_spacing=10, row_spacing=10) + grid = Gtk.Grid(column_homogeneous=True, column_spacing=10, + row_spacing=10) grid.attach(header, 0, 0, 2, 1) grid.attach(scrolled_tree, 0, 1, 2, 1) grid.attach(button_cancel, 0, 2, 1, 1) @@ -123,8 +124,8 @@ class GraphicalUI(Gtk.Window): def done(self, button): """Confirm choice""" dialog = Gtk.Dialog(txt.I_CONFIRM_SELECTION, None, 0, ( - Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, - Gtk.STOCK_OK, Gtk.ResponseType.OK)) + Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, + Gtk.STOCK_OK, Gtk.ResponseType.OK)) dialog.set_transient_for(self) dialog.set_border_width(10) box = dialog.get_content_area() diff --git a/pacman_mirrors/httpfn.py b/pacman_mirrors/httpfn.py index 96f0f83d6fcc9e2bcf867fdfe6ff0794dec062e7..9b22b73e7c1ba743d819e55f869bee75786a6ef9 100644 --- a/pacman_mirrors/httpfn.py +++ b/pacman_mirrors/httpfn.py @@ -163,7 +163,8 @@ def update_mirrors(config): result = None mjro_online = is_connected("http://repo.manjaro.org") if mjro_online: - print(".: {} {} {}".format(txt.INF_CLR, txt.DOWNLOADING_MIRROR_FILE, txt.REPO_SERVER)) + print(".: {} {} {}".format(txt.INF_CLR, txt.DOWNLOADING_MIRROR_FILE, + txt.REPO_SERVER)) result = download_mirrors(config) else: if not filefn.check_file(config["mirror_file"]): diff --git a/pacman_mirrors/pacman_mirrors.py b/pacman_mirrors/pacman_mirrors.py index 3466932d5bad67d035c2bc303e50bb14b96312ef..382bb17a09e2883567a105848ef4f865a087f1bb 100644 --- a/pacman_mirrors/pacman_mirrors.py +++ b/pacman_mirrors/pacman_mirrors.py @@ -123,7 +123,8 @@ class PacmanMirrors: parser.add_argument("-f", "--fasttrack", type=int, metavar=txt.DIGIT, - help="{} {}".format(txt.HLP_ARG_FASTTRACK, txt.OVERRIDE_OPT)) + help="{} {}".format(txt.HLP_ARG_FASTTRACK, + txt.OVERRIDE_OPT)) parser.add_argument("-l", "--list", action="store_true", help=txt.HLP_ARG_LIST) @@ -305,7 +306,8 @@ class PacmanMirrors: if self.default and custom_list: if self.config["method"] == "rank": custom_list = self.test_mirrors(custom_list) - custom_list = sorted(custom_list, key=itemgetter("resp_time")) + custom_list = sorted(custom_list, + key=itemgetter("resp_time")) else: shuffle(custom_list) @@ -326,13 +328,18 @@ class PacmanMirrors: print("--------------------------") # output mirror file jsonfn.write_json_file(mirrorfile, self.config["custom_file"]) - print(".: {} {}: {}".format(txt.INF_CLR, txt.CUSTOM_MIRROR_FILE_SAVED, self.config["custom_file"])) + print(".: {} {}: {}".format(txt.INF_CLR, + txt.CUSTOM_MIRROR_FILE_SAVED, + self.config["custom_file"])) # output pacman mirrorlist - filefn.output_mirror_list(self.config, selected, custom=True, quiet=self.quiet, interactive=True) + filefn.output_mirror_list(self.config, selected, + custom=True, quiet=self.quiet, + interactive=True) # always use "Custom" from interactive self.config["only_country"] = ["Custom"] configfn.modify_config(self.config, custom=True) - print(".: {} {} {}".format(txt.INF_CLR, txt.RESET_CUSTOM_CONFIG, txt.RESET_TIP)) + print(".: {} {} {}".format(txt.INF_CLR, txt.RESET_CUSTOM_CONFIG, + txt.RESET_TIP)) else: print(".: {} {}".format(txt.WRN_CLR, txt.NO_SELECTION)) print(".: {} {}".format(txt.INF_CLR, txt.NO_CHANGE))