Skip to content

Commit 2fb4986

Browse files
committed
Add workflow for python codestyle and typechecking
1 parent 1dc3de4 commit 2fb4986

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.github/workflows/codestyle.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,24 @@ jobs:
6969
webapp/public
7070
webapp/config
7171
72+
pycodestyle:
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v4
76+
- name: Download pycodestyle python file
77+
run: >
78+
curl -L -o /tmp/pycodestyle.py 'https://github.com/PyCQA/pycodestyle/raw/refs/tags/2.12.1/pycodestyle.py'
79+
- name: Check codestyle in python files
80+
run: >
81+
python3 /tmp/pycodestyle.py \
82+
--exclude='./example_problems/,./doc/,./gitlab/,./webapp/vendor/' \
83+
--max-line-length 120 \
84+
--show-pep8 --show-source \
85+
.
86+
87+
pyright:
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: jakebailey/pyright-action@v2
91+
with:
92+
version: 1.1.311

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tool.pyright]
2+
exclude = ["./doc/", "./example_problems/", "./webapp/vendor/", "./webapp/public/doc/manual/"]

0 commit comments

Comments
 (0)