Skip to content

Commit

Permalink
CI: replace flake8 by ruff check
Browse files Browse the repository at this point in the history
  • Loading branch information
esavary committed Mar 21, 2024
1 parent 62a213a commit 81b3690
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defaults:

jobs:
stable:
name: Run flake8
name: Run ruff
runs-on: ubuntu-latest

steps:
Expand All @@ -20,4 +20,4 @@ jobs:
with:
python-version: 3
- name: Lint EddyMotion
run: pipx run flake8-pyproject
run: pipx run ruff check
56 changes: 46 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,54 @@ exclude = '''
profile = 'black'
skip_gitignore = true

[tool.flake8]
max-line-length = 99
doctests = false
exclude = ["*build/", "docs/"]
select = "C,E,F,W,B,B950"
ignore = "N802,N806,W503,E203"
per-file-ignores = [
"*/__init__.py: F401",
"docs/conf.py: E265",
"/^\\s*\\.\\. _.*?: http/: E501"
[tool.ruff]
line-length = 99

[tool.ruff.lint]
extend-select = [
"F",
"E",
"W",
"I",
"UP",
"YTT",
"S",
"BLE",
"B",
"A",
# "CPY",
"C4",
"DTZ",
"T10",
# "EM",
"EXE",
"FA",
"ISC",
"ICN",
"PT",
"Q",
]
ignore = [
"S311", # We are not using random for cryptographic purposes
"ISC001",
"S603",
]

[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"

[tool.ruff.lint.extend-per-file-ignores]
"*/test_*.py" = ["S101"]
"docs/source/conf.py" = ["A001"]
"mriqc/bin/nib_hash.py" = ["S324"]
"mriqc/config.py" = ["S105"]
"mriqc/conftest.py" = ["PT004"]
"mriqc/engine/plugin.py" = ["BLE001"]
"mriqc/utils/debug.py" = ["A002", "T100"]

[tool.ruff.format]
quote-style = "single"

[tool.pytest.ini_options]
pythonpath = "src/ test/"
norecursedirs = [".*", "_*"]
Expand Down

0 comments on commit 81b3690

Please sign in to comment.