Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.4
rev: v0.16.1
hooks:
- id: ruff-check
args: [ --fix, --show-fixes ]
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'sphinxext')))

from github_link import make_linkcode_resolve # noqa: E402
from github_link import make_linkcode_resolve

os.environ['NO_ET'] = '1'

sys.path.insert(0, os.path.abspath('../wrapper'))

# -- Project information -----------------------------------------------------
project = _package
copyright = _copyright # noqa: A001
copyright = _copyright
author = 'The sMRIPrep Developers'

# The short X.Y version
Expand Down
4 changes: 2 additions & 2 deletions src/smriprep/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def build_workflow(opts, retval):
str(log_dir / 'CITATION.html'),
]
try:
check_call(cmd, timeout=10) # noqa: S603
check_call(cmd, timeout=10)
except (FileNotFoundError, CalledProcessError, TimeoutExpired):
logger.warning('Could not generate CITATION.html file:\n%s', ' '.join(cmd))

Expand All @@ -760,7 +760,7 @@ def build_workflow(opts, retval):
str(log_dir / 'CITATION.tex'),
]
try:
check_call(cmd, timeout=10) # noqa: S603
check_call(cmd, timeout=10)
except (FileNotFoundError, CalledProcessError, TimeoutExpired):
logger.warning('Could not generate CITATION.tex file:\n%s', ' '.join(cmd))
else:
Expand Down
5 changes: 2 additions & 3 deletions src/smriprep/interfaces/templateflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,8 @@ def fetch_template_files(
}
)

if res := specs.pop('res', None):
if res != 'native':
specs['resolution'] = res
if (res := specs.pop('res', None)) and res != 'native':
specs['resolution'] = res

if not specs.get('resolution'):
specs['resolution'] = 2 if sloppy else 1
Expand Down
2 changes: 1 addition & 1 deletion src/smriprep/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def fs_isRunning(subjects_dir, subject_id, mtime_tol=86400, logger=None):
for fl in isrunning:
fl.unlink()
if logger:
logger.warn(f'Removed "IsRunning*" files found under {subj_dir}')
logger.warning(f'Removed "IsRunning*" files found under {subj_dir}')
return subjects_dir


Expand Down
2 changes: 1 addition & 1 deletion src/smriprep/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def init_single_subject_wf(
)[0]

if not subject_data['t1w']:
raise Exception(
raise FileNotFoundError(
f'No T1w images found for participant {subject_id}. All workflows require T1w images.'
)

Expand Down
2 changes: 1 addition & 1 deletion test/utils/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class _Logger:
def __init__(self):
self.msg = None

def warn(self, msg):
def warning(self, msg):
self.msg = msg

logger = _Logger()
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ commands =
description = Check our style guide
labels = check
deps =
ruff
ruff ==0.16.1 # keep in sync with .pre-commit-config.yaml
skip_install = true
commands =
python tools/check_python_headers.py
Expand All @@ -84,7 +84,7 @@ commands =
description = Auto-apply style guide to the extent possible
labels = pre-release
deps =
ruff
ruff ==0.16.1 # keep in sync with .pre-commit-config.yaml
skip_install = true
commands =
ruff check --fix
Expand Down
Loading