From 7314dfdd02fe6d006553ac46205eb546f72aff5d Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 8 Apr 2022 21:56:42 +0200 Subject: [PATCH] bin: use apheleia to format code --- .dir-locals.el | 1 + bin/i3-companion | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 0000000..0e57764 --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1 @@ +((python-mode . ((mode . apheleia)))) diff --git a/bin/i3-companion b/bin/i3-companion index d82e4e3..ab333c9 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -14,20 +14,20 @@ import logging import logging.handlers import os import shlex +import socket +import struct import subprocess import sys import types -import struct -import socket -import i3ipc -from i3ipc.aio import Connection -from systemd import journal, daemon -import ravel import dbussy +import i3ipc +import ravel import xcffib -import xcffib.xproto import xcffib.randr +import xcffib.xproto +from i3ipc.aio import Connection +from systemd import daemon, journal def icon(font_number, char): @@ -816,7 +816,9 @@ async def bluetooth_status(i3, event, *args): (lambda x: x & 0x20, "printer"), ], } - icon = classes.get((device.major, device.minor)) or classes.get(device.major, "unknown") + icon = classes.get((device.major, device.minor)) or classes.get( + device.major, "unknown" + ) if type(icon) is list: for matcher, name in icon: if matcher(device.minor):