Simplify rendering by using more format strings

parent 1401bf13
Pipeline #53531244 passed with stage
in 1 minute and 11 seconds
......@@ -135,22 +135,13 @@ def main() -> None:
current_indicator = " "
wifi_dns = " "
print("{0} {1}: {2}".format(
current_indicator,
colorize(1, colorize(32, "Network")),
colorize(32, n['ssid'])
))
print(" {0}: {1} {2}".format(colorize(1, "Secured"), n['enc'], '(%s)' % n['auth']))
print(f"{current_indicator} {colorize(1, colorize(32, 'Network'))}: {colorize(32, n['ssid'])}")
print(f" {colorize(1, 'Secured')}: {n['enc']} ({n['auth']})")
if current_indicator != " ":
print(" {0}: {1}".format(colorize(1, "DNS"), wifi_dns))
print(f" {colorize(1, 'DNS')}: {wifi_dns}")
print(" {0}: {1}{2}".format(
colorize(1, "Frequency"),
n['freq'],
"\n" if n != networks[-1] else ""
))
print(f" {colorize(1, 'Frequency')}: {n['freq']}%s" % ("\n" if n != networks[-1] else ""))
if __name__ == "__main__":
......
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