1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/usr/bin/env bash
# ensure consistent behaviour
src_dir="$(dirname "$(realpath "$0")")"
source $src_dir/utils/_env.sh
dirs="python/knot_resolver/ tests/manager scripts/poe-tasks/utils/create_setup.py"
# sort python import
echo -e "${yellow}Sorting Python imports using ruff...${reset}"
ruff check --select I --fix $dirs
check_rv $?
echo
# format python code
echo -e "${yellow}Formatting Python code using ruff...${reset}"
ruff format $dirs
check_rv $?
echo
# fancy messages at the end :)
fancy_message
# exit with the aggregate return value
exit $aggregated_rv
|