Skip to content

Commit 17aaff6

Browse files
committedDec 28, 2022
fix black actions
1 parent 637f4f9 commit 17aaff6

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed
 

‎.github/workflows/black-docstr.yml

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
21
name: black-docstr
32

43
on: pull_request
54
jobs:
6-
black-docstr:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v2
10-
- run: |
11-
apt-get update && apt-get install git -y
12-
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
13-
- name: Running black and docstr-coverage check
14-
run: |
15-
sudo apt-get update
16-
sudo apt-get install git python3-pip -y
17-
sudo pip3 install black==22.10.0 docstr-coverage
18-
FILES="$(git diff --name-only --diff-filter=A --diff-filter=M "origin/${{github.base_ref}}" '*.py')"
19-
black --check -l 120 -t py37 --exclude 'templates' $FILES
20-
for FILE in $FILES; do echo $FILE; docstr-coverage $FILE || true; done
5+
black-docstr:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- run: |
10+
apt-get update && apt-get install git -y
11+
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
12+
- name: Running black and docstr-coverage check
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get install git python3-pip -y
16+
sudo pip3 install black==22.10.0 docstr-coverage
17+
FILES="$(git diff --name-only --diff-filter=A --diff-filter=M "origin/${{github.base_ref}}" '*.py')"
18+
[ ! -z "$FILES" ] && black --check -l 120 -t py37 --exclude 'templates' $FILES
19+
for FILE in $FILES; do echo $FILE; docstr-coverage $FILE || true; done

0 commit comments

Comments
 (0)