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
|
## 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 () {
|
||||||
|
|
Loading…
Reference in New Issue