Fix formatting with black

This commit is contained in:
GotthardG
2024-12-16 10:48:30 +01:00
parent d1b60790d6
commit 635feb6a5b
3 changed files with 16 additions and 9 deletions

View File

@ -30,8 +30,14 @@ lint:
stage: test
script:
- source $VIRTUAL_ENV/bin/activate
- pip install pre-commit
- pre-commit run --all-files || (echo "Auto-fixing formatting issues" && black backend/ && git diff && exit 1)
- pip install pre-commit black flake8
# Run pre-commit hooks
- pre-commit run --all-files || (
echo "Auto-fixing formatting issues with black..." &&
black backend/ && # Fix formatting locally
git diff && # Show fixes in pipeline output
exit 1 # Fail the job to indicate changes are needed
)
deploy:
stage: deploy