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