Skip to content

Commit 45ce25d

Browse files
committed
first sketch of cython-lint workflow
1 parent 193054b commit 45ce25d

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Linting
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.11", "3.12"]
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
19+
- name: Install dependencies
20+
run: |
21+
pip install uv
22+
uv pip install cython-lint --upgrade --system
23+
24+
- name: cython-lint
25+
run: |
26+
cython-lint --ignore=E114,E117,E127,E128,E129,E202,E221,E222,E231,E261,E262,E265,E302,E303,E306,E501,E701,E703,E711,E722,E731,E741,E743,W291,W293,W391,W605 src/

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ content-type = "text/markdown"
3939
requires = ["meson-python>=0.13", "cython>=3.0,<3.1"]
4040
build-backend = "mesonpy"
4141

42+
[tool.cython-lint]
43+
max-line-length = 120
44+
ignore = ['E225', 'E231', 'E501', 'E741']
45+
exclude = 'src/flint/flintlib/.*'
46+
4247
[tool.spin]
4348
package = "flint"
4449

0 commit comments

Comments
 (0)