Skip to content

Commit

Permalink
feat: add isort to lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuber21 committed Jul 12, 2023
1 parent 8df3f76 commit a6c5366
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/black.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ jobs:
else
echo "HAS_CHANGES=true" >> "$GITHUB_OUTPUT"
fi
- uses: actions/setup-python@v4
if: steps.changedfiles.outputs.HAS_CHANGES == 'true'
with:
python-version: "3.10"
run: |
python -m pip install isort
isort --check ${{ steps.changedfiles.outputs.CHANGED_FILES }}
- uses: psf/black@stable
name: Run black on changed files
if: steps.changedfiles.outputs.HAS_CHANGES == 'true'
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ repos:
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
language_version: python3.10

0 comments on commit a6c5366

Please sign in to comment.