mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
tools: checkpach supports python files
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user