Skip to content

Rename validation functions to private by prefixing with an underscor… #39

Rename validation functions to private by prefixing with an underscor…

Rename validation functions to private by prefixing with an underscor… #39

Workflow file for this run

name: Black
on: [push, pull_request]
permissions:
contents: write
pull-requests: write
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Black
run: pip install black
- name: Run Black
id: black
continue-on-error: true
run: |
black --check bbox_visualizer tests
echo "has_changes=$?" >> $GITHUB_OUTPUT
- name: Format with Black if needed
if: steps.black.outputs.has_changes == '1'
run: black bbox_visualizer tests
- name: Create Pull Request
if: steps.black.outputs.has_changes == '1'
uses: peter-evans/create-pull-request@v5
with:
commit-message: "style: format code with Black"
title: "style: format code with Black"
body: |
Auto-formatted code with Black.
This PR was automatically created by the Black formatting GitHub Action.
branch: format-code-with-black
base: main
delete-branch: true
token: ${{ secrets.GITHUB_TOKEN }}