Skip to content

Commit ca294dd

Browse files
authored
Merge branch 'develop' into dev-define-engines-abc
2 parents f85c6a6 + aed63b6 commit ca294dd

File tree

8 files changed

+11
-13
lines changed

8 files changed

+11
-13
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
sudo apt update
3131
sudo apt-get install -y libopenslide-dev openslide-tools libopenjp2-7 libopenjp2-tools
3232
python -m pip install --upgrade pip
33-
python -m pip install ruff==0.5.2 pytest pytest-cov pytest-runner
33+
python -m pip install ruff==0.5.6 "pytest<8.3.0" pytest-cov pytest-runner
3434
pip install -r requirements/requirements.txt
3535
- name: Cache tiatoolbox static assets
3636
uses: actions/cache@v3

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ repos:
6060
- id: rst-inline-touching-normal # Detect mistake of inline code touching normal text in rst.
6161
- repo: https://github.com/astral-sh/ruff-pre-commit
6262
# Ruff version.
63-
rev: v0.5.2
63+
rev: v0.5.6
6464
hooks:
6565
- id: ruff
6666
args: [--fix, --exit-non-zero-on-fix]

requirements/requirements_dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ mypy>=1.6.1
77
pip>=22.3
88
poetry-bumpversion>=0.3.1
99
pre-commit>=2.20.0
10-
pytest>=7.2.0
10+
pytest>=7.2.0, <8.3.0
1111
pytest-cov>=4.0.0
1212
pytest-runner>=6.0
1313
pytest-xdist[psutil]
14-
ruff==0.5.2 # This will be updated by pre-commit bot to latest version
14+
ruff==0.5.6 # This will be updated by pre-commit bot to latest version
1515
toml>=0.10.2
1616
twine>=4.0.1
1717
wheel>=0.37.1

tiatoolbox/annotation/storage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,10 +1841,10 @@ def _dump_cases(
18411841
# It is a file-like object, write to it
18421842
if hasattr(fp, "write"):
18431843
file_handle = cast(IO, fp)
1844-
return file_fn(file_handle)
1844+
return file_fn(file_handle) # type: ignore[func-returns-value]
18451845
# Turn a path into a file handle, then write to it
18461846
with Path(fp).open("w", encoding="utf-8") as file_handle:
1847-
return file_fn(file_handle)
1847+
return file_fn(file_handle) # type: ignore[func-returns-value]
18481848
# Return as str or bytes if no handle/path is given
18491849
return none_fn()
18501850

@@ -2840,7 +2840,7 @@ def _initialize_query_string_parameters(
28402840

28412841
return query_string, query_parameters
28422842

2843-
def _query( # noqa: PLR0913
2843+
def _query(
28442844
self: SQLiteStore,
28452845
columns: str,
28462846
geometry: Geometry | None = None,

tiatoolbox/models/engine/multi_task_segmentor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class MultiTaskSegmentor(NucleusInstanceSegmentor):
242242
243243
"""
244244

245-
def __init__( # noqa: PLR0913
245+
def __init__(
246246
self: MultiTaskSegmentor,
247247
batch_size: int = 8,
248248
num_loader_workers: int = 0,

tiatoolbox/tools/patchextraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ class SlidingWindowPatchExtractor(PatchExtractor):
623623
624624
"""
625625

626-
def __init__( # noqa: PLR0913
626+
def __init__(
627627
self: SlidingWindowPatchExtractor,
628628
input_img: str | Path | np.ndarray,
629629
patch_size: int | tuple[int, int],

tiatoolbox/utils/misc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,9 +1171,7 @@ def add_from_dat(
11711171
anns = []
11721172
for subcat in data:
11731173
if (
1174-
subcat == "resolution"
1175-
or subcat == "proc_dimensions"
1176-
or subcat == "base_dimensions"
1174+
subcat in {"resolution", "proc_dimensions", "base_dimensions"}
11771175
or "resolution" in subcat
11781176
):
11791177
continue

tiatoolbox/wsicore/wsimeta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class WSIMeta:
9696

9797
_valid_axes_characters = "YXSTZ"
9898

99-
def __init__( # noqa: PLR0913
99+
def __init__(
100100
self: WSIMeta,
101101
slide_dimensions: tuple[int, int],
102102
axes: str,

0 commit comments

Comments
 (0)