From bb83d8266aa2eb3816b012364fd8bb232e6b9c13 Mon Sep 17 00:00:00 2001
From: Hugo Posnic <hugo.posnic@protonmail.com>
Date: Thu, 30 Mar 2017 21:34:37 +0200
Subject: [PATCH] Just some PEP8

---
 pacman_mirrors/graphicalui.py    |  7 ++++---
 pacman_mirrors/httpfn.py         |  3 ++-
 pacman_mirrors/pacman_mirrors.py | 17 ++++++++++++-----
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/pacman_mirrors/graphicalui.py b/pacman_mirrors/graphicalui.py
index f0bdb05a..6e55d382 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 96f0f83d..9b22b73e 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 3466932d..382bb17a 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))
-- 
GitLab