Skip to content

Commit 4b6d38d

Browse files
authored
Merge pull request #419 from nipreps/chore/ruff
CHORE: Update ruff, ignore certain rules
2 parents 2355035 + 7378ee1 commit 4b6d38d

File tree

16 files changed

+21
-2
lines changed

16 files changed

+21
-2
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# 2024-03-07 - [email protected] - STY: ruff format smriprep [git-blame-ignore-rev]
2+
83a50d465145c6e8176c3f13d4673ed4e0bdb26f
13
# 2023-11-21 - [email protected] - STY: ruff --fix smriprep [git-blame-ignore-rev]
24
3a586cf46cb1bb963b93d9546f20273194d15de5
35
# 2023-11-20 - [email protected] - STY: ruff --fix smriprep [git-blame-ignore-rev]

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,5 @@ jobs:
119119
runs-on: ubuntu-latest
120120
steps:
121121
- uses: actions/checkout@v4
122-
- run: pipx run ruff smriprep
122+
- run: pipx run ruff check smriprep
123123
- run: pipx run ruff format --diff smriprep

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: check-toml
1212
- id: check-json
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.1.6
14+
rev: v0.3.1
1515
hooks:
1616
- id: ruff
1717
- id: ruff-format

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ extend-select = [
163163
"PT",
164164
"Q",
165165
]
166+
extend-ignore = [
167+
"S311", # We are not using random for cryptographic purposes
168+
"ISC001",
169+
"S603",
170+
]
166171

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

smriprep/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
1010
"""
11+
1112
from .__about__ import (
1213
__copyright__,
1314
__credits__,

smriprep/conf/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""sMRIPrep settings."""
2+
23
from templateflow.api import templates as _get_templates
34

45
TF_TEMPLATES = tuple(_get_templates())

smriprep/interfaces/freesurfer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Nipype's recon-all replacement."""
24+
2425
import os
2526

2627
from looseversion import LooseVersion

smriprep/interfaces/gifti.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Interfaces for manipulating GIFTI files."""
2+
23
import os
34

45
import nibabel as nb

smriprep/interfaces/surf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Handling surfaces."""
24+
2425
import os
2526
from pathlib import Path
2627

smriprep/interfaces/templateflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Interfaces to get templates from TemplateFlow."""
24+
2425
import logging
2526

2627
from nipype.interfaces.base import (

0 commit comments

Comments
 (0)