feat: add black formatting to linting rules

This commit is contained in:
Daylin Morgan 2022-07-29 09:44:46 -05:00
parent 3e0856ada2
commit 648ef787b8
5 changed files with 17 additions and 6 deletions

View file

@ -1,3 +1,6 @@
.PHONY: lint .PHONY: lint
lint: lint:
shfmt -s -w $(shell shfmt -f .) shfmt -s -w $(shell shfmt -f .)
black $(shell find -type f -name "*.py")

View file

@ -48,6 +48,7 @@ def dots():
console.print(Text(" ").join([Text("", style=color) for color in colors[:8]])) console.print(Text(" ").join([Text("", style=color) for color in colors[:8]]))
def double_dots(): def double_dots():
""" """
@ -57,6 +58,7 @@ def double_dots():
console.print(Text(" ").join([Text("", style=color) for color in colors[:8]])) console.print(Text(" ").join([Text("", style=color) for color in colors[:8]]))
console.print(Text(" ").join([Text("", style=color) for color in colors[8:]])) console.print(Text(" ").join([Text("", style=color) for color in colors[8:]]))
def wave_w_dots(): def wave_w_dots():
""" """
Alternating colors from red to white with Alternating colors from red to white with
@ -80,7 +82,12 @@ def wave_w_dots():
def main(): def main():
prompts = {"wave": wave, "dots": dots,'double-dots':double_dots, "wave-dots": wave_w_dots} prompts = {
"wave": wave,
"dots": dots,
"double-dots": double_dots,
"wave-dots": wave_w_dots,
}
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="generate ansi color coded login prompts" description="generate ansi color coded login prompts"
) )

View file

@ -58,7 +58,7 @@ echo "serving directory:"
echo "->>$DIR" echo "->>$DIR"
echo "opening $URL using $BROWSER" echo "opening $URL using $BROWSER"
$BROWSER $URL > /dev/null 2>&1 & $BROWSER $URL >/dev/null 2>&1 &
# first change directory in case python<3.7 # first change directory in case python<3.7
ssh -tL localhost:$PORT:localhost:$PORT $USER_HOST \ ssh -tL localhost:$PORT:localhost:$PORT $USER_HOST \

View file

@ -12,6 +12,7 @@ Regenerate with generate_install_scripts.py
FILE_DIR = Path(__file__).parent FILE_DIR = Path(__file__).parent
def shell_script_writer(extensions_dict, filename): def shell_script_writer(extensions_dict, filename):
with Path(filename).open("w") as f: with Path(filename).open("w") as f:
f.write("#!/bin/bash\n") f.write("#!/bin/bash\n")