tools: checkpach supports python files
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
8a55ab680a
commit
573317cada
@ -80,7 +80,11 @@ check_file() {
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "$(is_rust_file $@)" == "1" ]; then
|
||||
if [ ${@##*.} == 'py' ]; then
|
||||
black --check $@
|
||||
flake8 --config ${TOOLDIR}/../.github/linters/setup.cfg $@
|
||||
isort $@
|
||||
elif [ "$(is_rust_file $@)" == "1" ]; then
|
||||
if ! command -v rustfmt &> /dev/null; then
|
||||
fail=1
|
||||
elif ! rustfmt --edition 2021 --check $@ 2>&1; then
|
||||
|
Loading…
Reference in New Issue
Block a user