Manual fixes to Python file

To see if I like the rules
This commit is contained in:
Geoffrey Frogeye 2025-05-08 18:29:03 +02:00
parent 34b545890d
commit 8179433c41
10 changed files with 612 additions and 547 deletions

View file

@ -1,13 +1,32 @@
#! /usr/bin/env python2
from subprocess import check_output
import subprocess
def get_pass(account):
return check_output("pass " + account, shell=True).splitlines()[0]
def beep():
check_output(
"play -n synth sine E4 sine A5 remix 1-2 fade 0.5 1.2 0.5 2",
shell=True,
def get_pass(account: str) -> str:
proc = subprocess.run(
["pass", account], # noqa: S607
stdout=subprocess.PIPE,
check=True,
)
raw = proc.stdout.decode()
return raw.splitlines()[0]
def beep() -> None:
cmd = [
"play",
"-n",
"synth",
"sine",
"E4",
"sine",
"A5",
"remix",
"1-2",
"fade",
"0.5",
"1.2",
"0.5",
"2",
]
subprocess.run(cmd, check=False)