Actualización
This commit is contained in:
parent
609f06e2f4
commit
778a4bf0cc
15
aliases.sh
15
aliases.sh
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue