Skip to content

Commit 12f8fe4

Browse files
committed
resolve sonar issues
1 parent 2915b1b commit 12f8fe4

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

lambdas/shared/src/common/validator/parsers/paser_interface.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class PaserInterface(ABC):
1010
"""Defines a common interface for all data extractors."""
1111

1212
@abstractmethod
13-
def extract_field_values(self, field_path: str, data) -> dict:
13+
def extract_field_values(self, field_path: str) -> dict:
1414
pass
1515

1616
@abstractmethod
@@ -26,7 +26,7 @@ def __init__(self, fhir_data: dict):
2626
def get_data_format(self) -> str:
2727
return "fhir"
2828

29-
def extract_field_values(self, field_path):
29+
def extract_field_values(self, field_path) -> list[str]:
3030
fhir_value = self.fhir_parser.get_fhir_value_list(field_path)
3131
return fhir_value
3232

@@ -39,6 +39,6 @@ def __init__(self, csv_row: str, csv_header: str):
3939
def get_data_format(self) -> str:
4040
return "batch"
4141

42-
def extract_field_values(self, field_path):
42+
def extract_field_values(self, field_path) -> list[str]:
4343
csv_value = self.csv_line_parser.get_key_value(field_path)
4444
return csv_value

lambdas/shared/src/common/validator/validator.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,6 @@ def validate_fhir(
9393
inc_header_in_row_count=inc_header_in_row_count,
9494
)
9595

96-
def validate_csv(
97-
self,
98-
batch_filepath: str,
99-
summarise: bool = False,
100-
report_unexpected_exception: bool = True,
101-
inc_header_in_row_count: bool = True,
102-
) -> list[ErrorReport]:
103-
return self.run_validation(
104-
data_type=DataType.CSV,
105-
batch_filepath=batch_filepath,
106-
summarise=summarise,
107-
report_unexpected_exception=report_unexpected_exception,
108-
inc_header_in_row_count=inc_header_in_row_count,
109-
)
110-
11196
def validate_csv_row(
11297
self,
11398
csv_row: str,

0 commit comments

Comments
 (0)