mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-24 19:11:58 +03:00
Remove mypy ignore and typecast labels to list
This commit is contained in:
parent
14ae4a52c0
commit
0b32a949f1
|
@ -191,7 +191,7 @@ class Exclusive_SpanCategorizer(SpanCategorizer):
|
|||
DOCS: https://spacy.io/api/spancatcategorizer#set_annotations
|
||||
"""
|
||||
allow_overlap = cast(bool, self.cfg["allow_overlap"])
|
||||
labels = self.labels
|
||||
labels = list(self.labels)
|
||||
indices, scores = indices_scores
|
||||
offset = 0
|
||||
for i, doc in enumerate(docs):
|
||||
|
@ -200,7 +200,7 @@ class Exclusive_SpanCategorizer(SpanCategorizer):
|
|||
doc,
|
||||
indices_i,
|
||||
scores[offset : offset + indices.lengths[i]],
|
||||
labels, # type: ignore[arg-type]
|
||||
labels,
|
||||
allow_overlap,
|
||||
)
|
||||
offset += indices.lengths[i]
|
||||
|
|
Loading…
Reference in New Issue
Block a user