bin: use apheleia to format code

This commit is contained in:
Vincent Bernat 2022-04-08 21:56:42 +02:00
parent 0dd6a2847d
commit 7314dfdd02
2 changed files with 11 additions and 8 deletions

1
.dir-locals.el Normal file
View file

@ -0,0 +1 @@
((python-mode . ((mode . apheleia))))

View file

@ -14,20 +14,20 @@ import logging
import logging.handlers import logging.handlers
import os import os
import shlex import shlex
import socket
import struct
import subprocess import subprocess
import sys import sys
import types import types
import struct
import socket
import i3ipc
from i3ipc.aio import Connection
from systemd import journal, daemon
import ravel
import dbussy import dbussy
import i3ipc
import ravel
import xcffib import xcffib
import xcffib.xproto
import xcffib.randr import xcffib.randr
import xcffib.xproto
from i3ipc.aio import Connection
from systemd import daemon, journal
def icon(font_number, char): def icon(font_number, char):
@ -816,7 +816,9 @@ async def bluetooth_status(i3, event, *args):
(lambda x: x & 0x20, "printer"), (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: if type(icon) is list:
for matcher, name in icon: for matcher, name in icon:
if matcher(device.minor): if matcher(device.minor):