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
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,32 @@ target-version = "py312"
[tool.ruff.lint]
select = [
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"E", # pycodestyle errors
"ERA", # eradicate
"F", # Pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FURB", # refurb
"I", # isort
"N", # pep8-naming
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"PERF", # Perflint
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"TCH", # flake8-type-checking
"UP", # pyupgrade
]
ignore = []
Expand Down
3 changes: 1 addition & 2 deletions src/rbc/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def reorient(in_file: Path, output_fname: str) -> afni.V3dresampleOutputs:
"""
with create_copy(in_file) as tmp_file:
afni.v_3drefit(in_file=tmp_file, deoblique=True)
reorient = afni.v_3dresample(
return afni.v_3dresample(
in_file=tmp_file, prefix=output_fname, orientation="RPI"
)
return reorient
6 changes: 4 additions & 2 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def test_copy_successful(self, test_file: pl.Path) -> None:
"""Test copy created successfully."""
with utils.create_copy(test_file) as tmp_file:
assert isinstance(tmp_file, pl.Path)
assert tmp_file.exists() and tmp_file.is_file()
assert tmp_file.exists()
assert tmp_file.is_file()
assert tmp_file.read_text() == "Sample content"

def test_copy_correct_name(self, test_file: pl.Path) -> None:
Expand All @@ -40,4 +41,5 @@ def test_cleanup(self, test_file: pl.Path) -> None:
with utils.create_copy(test_file) as tmp_file:
tmp_dir = tmp_file.parent
assert tmp_dir.exists()
assert not tmp_file.exists() and not tmp_dir.exists()
assert not tmp_file.exists()
assert not tmp_dir.exists()