Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: lint
on:
push:
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
- uses: astral-sh/ruff-action@v3
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,19 @@ Downloads = "https://github.com/python-cffi/cffi/releases"
Contact = "https://groups.google.com/forum/#!forum/python-cffi"
"Source Code" = "https://github.com/python-cffi/cffi"
"Issue Tracker" = "https://github.com/python-cffi/cffi/issues"

[tool.codespell]
ignore-words-list = "alltime,blong,ccompiler,fo,hel"
skip = "*.bak"

[tool.ruff.lint]
select = [
"E9",
"F63",
"F7",
"F82",
]
[tool.ruff.lint.per-file-ignores]
"src/cffi/verifier.py" = ["F821"]
"testing/*" = ["F821"]

2 changes: 1 addition & 1 deletion testing/cffi1/test_re_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def test_rec_structs_1():
#
from _rec_structs_1 import ffi
# the following line used to raise TypeError
# unless preceeded by 'ffi.sizeof("struct C")'.
# unless preceded by 'ffi.sizeof("struct C")'.
sz = ffi.sizeof("struct B")
assert sz == ffi.sizeof("int *")

Expand Down
Loading