Skip to content

Bump the github-actions group with 2 updates #273

Bump the github-actions group with 2 updates

Bump the github-actions group with 2 updates #273

Workflow file for this run

name: autofix.ci
on:
workflow_call:
pull_request:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Upgrade to the latest Python syntax with https://github.com/asottile/pyupgrade
- uses: install-pinned/pyupgrade@db06e93ad73b120eb0fcec2f32ddd7fcd01d9435
- name: Run pyupgrade
run: |
shopt -s globstar
pyupgrade --exit-zero-even-if-changed --py39-plus **/*.py
# Sort imports with https://github.com/asottile/reorder_python_imports
- uses: install-pinned/reorder_python_imports@4919b538f4633769fd61b53a217ee8189332f49e
- name: Run reorder-python-imports
run: |
shopt -s globstar
reorder-python-imports --exit-zero-even-if-changed --py39-plus **/*.py
# Remove unused imports with https://github.com/PyCQA/autoflake
- uses: install-pinned/autoflake@4ec21525e4de790a8b76d1224a2dd45868a2239d
- run: autoflake --in-place --remove-all-unused-imports -r .
# Format code with https://github.com/psf/black
- uses: install-pinned/black@da1c4cd9047284302028272b9db712597533fac6
- run: black .
- uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc