Skip to content

Commit 55684a9

Browse files
committed
ruff github action, pyproject
1 parent 6f50cd8 commit 55684a9

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/ruff.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: ruff
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
ruff:
10+
name: Check code with ruff
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: astral-sh/ruff-action@v3
15+
with:
16+
args: "check"

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,18 @@ exclude = [
104104
[[tool.mypy.overrides]]
105105
module = "pyperf"
106106
ignore_missing_imports = true
107+
108+
[tool.ruff.lint]
109+
ignore = [
110+
"E402", # module level import not at top of file
111+
"E501", # line too long
112+
"E701", # multiple statements on one line (colon)
113+
"E722", # do not use bare 'except'
114+
"E741", # ambiguous variable name
115+
"F405" # name may be undefined, or defined from star imports
116+
]
117+
118+
select = [
119+
"E",
120+
"F",
121+
]

0 commit comments

Comments
 (0)