diff --git a/backend/data_import/pipeline/makers.py b/backend/data_import/pipeline/makers.py index 59e033f5..1f6122d6 100644 --- a/backend/data_import/pipeline/makers.py +++ b/backend/data_import/pipeline/makers.py @@ -27,7 +27,7 @@ class ExampleMaker: self.data_class = data_class self.column_data = column_data self.exclude_columns = exclude_columns or [] - self._errors = [] + self._errors: List[FileParseException] = [] def make(self, df: pd.DataFrame) -> List[Example]: if not self.check_column_existence(df): @@ -76,7 +76,7 @@ class LabelMaker: def __init__(self, column: str, label_class: Type[Label]): self.column = column self.label_class = label_class - self._errors = [] + self._errors: List[FileParseException] = [] def make(self, df: pd.DataFrame) -> List[Label]: if not self.check_column_existence(df): diff --git a/backend/data_import/tests/test_makers.py b/backend/data_import/tests/test_makers.py index c463dd51..2570281d 100644 --- a/backend/data_import/tests/test_makers.py +++ b/backend/data_import/tests/test_makers.py @@ -4,8 +4,8 @@ import pandas as pd from django.test import TestCase from data_import.pipeline.data import TextData -from data_import.pipeline.formatters import ExampleMaker, LabelMaker from data_import.pipeline.label import CategoryLabel +from data_import.pipeline.makers import ExampleMaker, LabelMaker from data_import.pipeline.readers import ( FILE_NAME_COLUMN, LINE_NUMBER_COLUMN,