Skip to content

Commit 999d22f

Browse files
committed
Add workflow for python codestyle and typechecking
1 parent 4ff100e commit 999d22f

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
@@ -66,3 +66,24 @@ jobs:
6666
webapp/public
6767
webapp/config
6868
69+
pycodestyle:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- name: Download pycodestyle python file
74+
run: >
75+
curl -L -o /tmp/pycodestyle.py 'https://github.com/PyCQA/pycodestyle/raw/refs/tags/2.12.1/pycodestyle.py'
76+
- name: Check codestyle in python files
77+
run: >
78+
python3 /tmp/pycodestyle.py \
79+
--exclude='./example_problems/,./doc/,./gitlab/,./webapp/vendor/' \
80+
--max-line-length 120 \
81+
--show-pep8 --show-source \
82+
.
83+
84+
pyright:
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: jakebailey/pyright-action@v2
88+
with:
89+
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)