Skip to content

Commit

Permalink
Use black action as recommended in docs
Browse files Browse the repository at this point in the history
See
https://black.readthedocs.io/en/stable/integrations/github_actions.html
for more details on how it's advised to run `black` via a github action.
  • Loading branch information
yousefmoazzam committed Jul 16, 2024
1 parent 2e82e9b commit a94eff8
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python linters
name: Lint

on:
push:
Expand All @@ -9,24 +9,10 @@ on:
- main

jobs:
run-linters:
name: Run linters
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository code
uses: actions/checkout@v4

# setup Python 3.10
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Python dependencies
run: pip install black

- name: Run Black linter
uses: wearerequired/lint-action@v2
with:
black: true
- name: Run black
uses: psf/black@stable

0 comments on commit a94eff8

Please sign in to comment.