From 31c7ce507252e7b739d78fcb69e63aec5b5bc9ec Mon Sep 17 00:00:00 2001 From: kadarakos Date: Wed, 26 Apr 2023 19:17:07 +0000 Subject: [PATCH] mypy fix --- spacy/ml/extract_spans.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/ml/extract_spans.py b/spacy/ml/extract_spans.py index ec674115b..6d0e141ec 100644 --- a/spacy/ml/extract_spans.py +++ b/spacy/ml/extract_spans.py @@ -57,7 +57,7 @@ def _get_span_indices(ops, spans: Ragged, lengths: Ints1d) -> Ints1d: for i, length in enumerate(lengths): spans_i = spans[i].dataXd + offset for j in range(spans_i.shape[0]): - indices += list(range(spans_i[j, 0], spans_i[j, 1])) # type: ignore[call-overload, index] + indices += list(range(spans_i[j, 0], spans_i[j, 1])) # type: ignore offset += length return ops.xp.asarray(indices, dtype="int")