Skip to content

Commit 5de542f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5331e2a commit 5de542f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/engines/test_semantic_segmentor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import json
66
import sqlite3
77
import tempfile
8+
from collections.abc import Callable
89
from pathlib import Path
9-
from typing import Callable
1010
from unittest import mock
1111

1212
import dask.array as da

tiatoolbox/models/engine/engine_abc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def infer_patches(
524524
coordinates = []
525525

526526
# Main output dictionary
527-
raw_predictions = dict(zip(keys, [[]] * len(keys)))
527+
raw_predictions = dict(zip(keys, [[]] * len(keys), strict=False))
528528

529529
# Inference loop
530530
tqdm = get_tqdm()
@@ -670,7 +670,9 @@ def save_predictions(
670670
computed_values = compute(*values_to_compute)
671671

672672
# Assign computed values
673-
processed_predictions = dict(zip(keys_to_compute, computed_values))
673+
processed_predictions = dict(
674+
zip(keys_to_compute, computed_values, strict=False)
675+
)
674676

675677
if output_type.lower() == "dict":
676678
return processed_predictions

0 commit comments

Comments
 (0)