File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Python Style Checks
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - experimental
7
+ - next
8
+ pull_request :
9
+ branches :
10
+ - experimental
11
+ - next
12
+
13
+ jobs :
14
+ stylecheckpython :
15
+ name : Style Check Python with Lint
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - name : Check out source repository
19
+ uses : actions/checkout@v4
20
+ with :
21
+ fetch-depth : 0 # This is necessary to get the commits
22
+ - name : Get changed python files between base and head
23
+ run : >
24
+ echo "CHANGED_FILES=$(echo $(git diff --diff-filter=ACMRTB --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} -- | grep -E '\.py$'))" >> $GITHUB_ENV
25
+ - if : ${{ env.CHANGED_FILES }}
26
+ uses : marian-code/python-lint-annotate@v4
27
+ with :
28
+ python-root-list : ${{ env.CHANGED_FILES }}
29
+ extra-pycodestyle-options : " --max-line-length=80"
30
+ extra-black-options : " --line-length=80"
31
+ extra-isort-options : " --line-length=80 -m=HANGING_INDENT"
32
+ # NOTE: we disable flake8 and pylint here to avoid overlap with lint action and limit noise
33
+ use-flake8 : false
34
+ extra-flake8-options : " --max-line-length=80"
35
+ use-pylint : false
36
+ # NOTE: pylint C0209 string format suggestions requires python3.6+ so disable here
37
+ # https://pylint.pycqa.org/en/latest/user_guide/messages/convention/consider-using-f-string.html
38
+ extra-pylint-options : " --max-line-length=80 --disable=C0209"
You can’t perform that action at this time.
0 commit comments