Turn the comments from black off #114
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Black main | |
# Without review-dog… maybe it’s a bit of waste to make them run twice, but anyway. | |
on: [push, pull_request] | |
jobs: | |
lint-changed: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check for changed python files in commit or pull request | |
uses: tj-actions/changed-files@v35 | |
id: changed-files | |
with: | |
files: "**/*.py" | |
- name: format files | |
uses: psf/black@stable | |
if: steps.changed-files.outputs.all_changed_files != '' | |
with: | |
# formatting all the files, since filtering didn’t work, and then filtering them manually | |
# src: "${{ steps.changed-files.outputs.all_changed_files }}" | |
options: "" | |
- name: (Files that are incorrectly formatted) ∩ (Files that have been changed in this commit or pull request) | |
run: git diff --exit-code -- ${{ steps.changed-files.outputs.all_changed_files }} | |
if: steps.changed-files.outputs.all_changed_files != '' |