Commit a676cb67 authored by Hugo Posnic's avatar Hugo Posnic

Hamonize modules docstrings

parent 8b975179
......@@ -18,7 +18,7 @@
# Authors: Frede Hundewadt <frede@hundewadt.dk>
"""
Pacman Mirrors
Pacman-Mirrors
Utilities Module
"""
import json
......
......@@ -18,23 +18,23 @@
# Authors: Frede Hundewadt <frede@hundewadt.dk>
"""
Pacman Mirrors
Pacman-Mirrors
Console UI Module
"""
from collections import namedtuple
import npyscreen
from . import txt
from . console_helpers import ConsoleHelpers
from . import i18n
Util = ConsoleHelpers
Util = ConsoleHelpers
_ = i18n.language.gettext
class ConsoleUI(npyscreen.NPSAppManaged):
"""
App
"""
"""App"""
def __init__(self, server_list):
npyscreen.NPSAppManaged.__init__(self)
......@@ -44,9 +44,7 @@ class ConsoleUI(npyscreen.NPSAppManaged):
self.is_done = False
def main(self):
"""
Main
"""
"""Main"""
main_server_list = []
server = namedtuple("Server", ["country",
"response_time",
......@@ -73,10 +71,9 @@ class ConsoleUI(npyscreen.NPSAppManaged):
value=[],
values=server_rows,
scroll_exit=True)
# activate form
mainform.edit()
# done
self.done(selected_servers.get_selected_objects())
mainform.edit() # activate form
self.done(selected_servers.get_selected_objects()) # done
def done(self, selection):
"""
......@@ -91,7 +88,6 @@ class ConsoleUI(npyscreen.NPSAppManaged):
"response_time": server[1].strip(),
"last_sync": server[2].strip(),
"url": server[3].strip()})
self.is_done = True
self.setNextForm(None)
......
......@@ -18,7 +18,11 @@
# Authors: Esclapion
# Hugo Posnic <huluti@manjaro.org>
""" Module GraphicalUI GUI"""
"""
Pacman-Mirrors
Graphical UI Module
"""
import gi
from . import i18n
from . import txt
......@@ -123,8 +127,7 @@ class GraphicalUI(Gtk.Window):
self.is_done = True
Gtk.main_quit()
elif response == Gtk.ResponseType.CANCEL:
# Go back to selection
dialog.destroy()
dialog.destroy() # Go back to selection
def run(server_list):
......
......@@ -22,7 +22,8 @@
# Frede Hundewadt <frede@hundewadt.dk>
"""
Module PacmanMirrors
Pacman-Mirrors
Main Module
"""
import argparse
......
......@@ -18,7 +18,7 @@
# Authors: Frede Hundewadt <frede@hundewadt.dk>
"""
Pacman Mirrors
Pacman-Mirrors
Text Module
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment