feat: add black formatting to linting rules
This commit is contained in:
parent
3e0856ada2
commit
648ef787b8
5 changed files with 17 additions and 6 deletions
3
Makefile
3
Makefile
|
@ -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")
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
|
@ -40,14 +40,14 @@ eget_tool() {
|
||||||
file=$(key=$tool yq e 'explode(.) | .[env(key)].file // ""' $YAMLDOC)
|
file=$(key=$tool yq e 'explode(.) | .[env(key)].file // ""' $YAMLDOC)
|
||||||
to=$(key=$tool yq e 'explode(.) | .[env(key)].to // ""' $YAMLDOC)
|
to=$(key=$tool yq e 'explode(.) | .[env(key)].to // ""' $YAMLDOC)
|
||||||
download_only=$(key=$tool yq e 'explode(.) | .[env(key)].download-only // ""' $YAMLDOC)
|
download_only=$(key=$tool yq e 'explode(.) | .[env(key)].download-only // ""' $YAMLDOC)
|
||||||
custom_flags=$(key=$tool yq e 'explode(.) | .[env(key)].custom_flags // ""' $YAMLDOC)
|
custom_flags=$(key=$tool yq e 'explode(.) | .[env(key)].custom_flags // ""' $YAMLDOC)
|
||||||
|
|
||||||
eget $user/$tool \
|
eget $user/$tool \
|
||||||
${asset:+--asset $asset} \
|
${asset:+--asset $asset} \
|
||||||
${file:+--file $file} \
|
${file:+--file $file} \
|
||||||
${to:+--to $to} \
|
${to:+--to $to} \
|
||||||
${download_only:+--download-only} \
|
${download_only:+--download-only} \
|
||||||
${custom_flags} \
|
${custom_flags} \
|
||||||
-q
|
-q
|
||||||
|
|
||||||
if [[ $download_only ]]; then
|
if [[ $download_only ]]; then
|
||||||
|
|
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue