Actualización

This commit is contained in:
perro tuerto 2024-04-19 11:28:37 -07:00
parent 609f06e2f4
commit 778a4bf0cc
1 changed files with 9 additions and 6 deletions

View File

@ -549,17 +549,20 @@ git () {
## Embellece y verifica código
pymp () {
if [ ! -d "${@:$#}" ] && [ ! -f "${@:$#}" ]; then
pympath=$(pwd)
else
pympath=${@:$#}
fi
case $1 in
-f | formatear | format)
black --line-length $LENGTH ${@:$#} --quiet ;;
black --line-length $LENGTH $pympath --quiet ;;
-h | --help | help | ayuda)
pymp-help ;;
esac
if [ ! -d "${@:$#}" ] && [ ! -f "${@:$#}" ]; then
echo-error "último argumento debe ser un fichero existente."
fi
flake8 --max-line-length $LENGTH --exit-zero ${@:$#}
vulture --exclude .venv ${@:$#} || true
flake8 --max-line-length $LENGTH --exit-zero $pympath
vulture --exclude .venv $pympath || true
unset pympath
}
pymp-help () {