Skip to content

Commit 1429ff7

Browse files
committed
mypy2
1 parent 320f341 commit 1429ff7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autointent/modules/scoring/_gcn/gcn_scorer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any
1+
from typing import Any, cast
22

33
import numpy.typing as npt
44
import torch
@@ -97,10 +97,10 @@ def get_implicit_initialization_params(self) -> dict[str, Any]:
9797
}
9898

9999
def get_train_data(self, context: Context) -> tuple[list[str], ListOfLabels, list[str]]:
100-
descriptions = [intent.description or intent.name for intent in context.data_handler.dataset.intents]
100+
descriptions = [intent.description or intent.name or "" for intent in context.data_handler.dataset.intents]
101101
return (
102102
context.data_handler.train_utterances(0),
103-
context.data_handler.train_labels(0),
103+
cast(ListOfLabels, context.data_handler.train_labels(0)),
104104
descriptions,
105105
)
106106

0 commit comments

Comments
 (0)