Skip to content

Commit ffc99db

Browse files
authored
👷 Use black[jupyter] (#847)
* 👷 Use black[jupyter] * 👷 Add missing matrix
1 parent 18067aa commit ffc99db

File tree

4 files changed

+805
-783
lines changed

4 files changed

+805
-783
lines changed

.github/workflows/pull_format.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,34 @@ on: [pull_request]
44

55
permissions:
66
contents: write
7+
78
jobs:
89
pull_format:
9-
runs-on: ubuntu-latest
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
python-version: ["3.10"]
15+
os: [ubuntu-latest]
16+
fail-fast: false
17+
1018
continue-on-error: true
19+
1120
steps:
1221
- name: checkout
1322
continue-on-error: true
1423
uses: actions/checkout@v3
1524
with:
1625
ref: ${{ github.head_ref }}
1726
fetch-depth: 0
18-
19-
27+
2028
- name: Set up Python ${{ matrix.python-version }}
2129
uses: actions/setup-python@v4
2230
with:
2331
python-version: ${{ matrix.python-version }}
2432

2533
- name: Install Black
26-
run: pip install black
34+
run: pip install "black[jupyter]"
2735

2836
- name: Run Black
2937
# run: black $(git ls-files '*.py')

.github/workflows/push_format.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ on:
88
permissions:
99
contents: write
1010
pull-requests: write
11+
1112
jobs:
1213
push_format:
13-
runs-on: ubuntu-latest
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
python-version: ["3.10"]
19+
os: [ubuntu-latest]
20+
fail-fast: false
21+
1422
steps:
1523
- uses: actions/checkout@v3
1624
with:
@@ -22,7 +30,7 @@ jobs:
2230
python-version: ${{ matrix.python-version }}
2331

2432
- name: Install Black
25-
run: pip install black
33+
run: pip install "black[jupyter]"
2634

2735
- name: Run Black
2836
# run: black $(git ls-files '*.py')
@@ -36,7 +44,7 @@ jobs:
3644
git config --local user.name "github-actions[bot]"
3745
git add --all
3846
git commit -m "Format code"
39-
47+
4048
- name: Create Pull Request
4149
if: steps.commitback.outcome == 'success'
4250
continue-on-error: true

0 commit comments

Comments
 (0)