Skip to content

Commit

Permalink
Enable black in the workflow to check formatting
Browse files Browse the repository at this point in the history
We don't format the code. It is up to the commiter to call black on its
own code. The workflow only checks that formatting is ok.

Signed-off-by: Guillaume <[email protected]>
  • Loading branch information
gthvn1 committed Oct 23, 2024
1 parent b85eebc commit 0435244
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ name: Check coding style
on: [push]

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: black
run: |
black --unstable .
pycodestyle:
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[pycodestyle]
max-line-length=120
ignore=E261,E302,E305,E402,W503
ignore=E203,E261,E302,E305,E402,E701,W503

[pydocstyle]
ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D210,D212,D401,D403

[tool.black]
line-length=120

0 comments on commit 0435244

Please sign in to comment.