forked from drath/libratbag
build: add Python code formatting with black
NOTE: this will fail tests as of this commit, as the code is not formatted yet. We didn't explicitly specify a minimum Python version before that, so I used v3.7 here, because it's the minimal version Ruff - a Python linter I will add in the next commit - supports.
This commit is contained in:
10
test/python-black-check.sh
Executable file
10
test/python-black-check.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$MESON_SOURCE_ROOT" ]; then
|
||||
echo "Expected \$MESON_SOURCE_ROOT to be set. Are you sure you are running this through ninja?"
|
||||
exit 100
|
||||
fi
|
||||
|
||||
cd "$MESON_SOURCE_ROOT" || exit 101
|
||||
|
||||
black --check $(git ls-files "*.py" "*.py.in")
|
||||
Reference in New Issue
Block a user