Skip to content

Commit 4703495

Browse files
Black format checker (#1311)
* black checker * Simplified * add examples to black format check Co-authored-by: Matthias Feurer <[email protected]>
1 parent 6f13379 commit 4703495

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: black-format-check
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
#If STRICT is set to true, it will fail on black check fail
7+
STRICT: false
8+
9+
jobs:
10+
11+
black-format-check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup Python 3.7
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: "3.7"
22+
23+
- name: Install black
24+
run: |
25+
pip install black
26+
27+
- name: Run Black Check
28+
run: |
29+
black --check --diff --line-length 100 ./autosklearn || ! $STRICT
30+
black --check --diff --line-length 100 ./test || ! $STRICT
31+
black --check --diff --line-length 100 ./examples|| ! $STRICT

0 commit comments

Comments
 (0)