Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
16 changes: 16 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ruff

on: [push, pull_request, workflow_dispatch]

permissions:
contents: read

jobs:
ruff:
name: Check code with ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/ruff-action@v3
with:
args: "check"
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.11
hooks:
- id: ruff-check
name: Run Ruff (lint)
args: [--exit-non-zero-on-fix]
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,21 @@ exclude = [
[[tool.mypy.overrides]]
module = "pyperf"
ignore_missing_imports = true

[tool.ruff]
target-version = "py310"

[tool.ruff.lint]
ignore = [
"E402", # module level import not at top of file
"E501", # line too long
"E701", # multiple statements on one line (colon)
"E722", # do not use bare 'except'
"E741", # ambiguous variable name
"F405" # name may be undefined, or defined from star imports
]

select = [
"E",
"F",
]
Loading