From 64cd4c3bff3b5beec9ea762b6aee851e79eb4de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C3=A9lie=20Rondot?= Date: Wed, 14 Feb 2024 11:21:28 +0100 Subject: [PATCH] Refacto: Fix signature 'primary_key_cells' method and remove useless 'type: ignore' --- frictionless/resources/table.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frictionless/resources/table.py b/frictionless/resources/table.py index 5ec614f01f..4cce3af465 100644 --- a/frictionless/resources/table.py +++ b/frictionless/resources/table.py @@ -347,8 +347,8 @@ def row_stream(): error = errors.PrimaryKeyError.from_row(row, note=note) row.errors.append(error) else: - match = memory_primary.get(cells) # type: ignore - memory_primary[cells] = row.row_number # type: ignore + match = memory_primary.get(cells) + memory_primary[cells] = row.row_number if match: if match: note = "the same as in the row at position %s" % match @@ -442,7 +442,7 @@ def remove_field_from_field_info(field_name: str, field_info: Dict[str, Any]): del field_info["objects"][field_index] del field_info["mapping"][field_name] - def primary_key_cells(self, row: Row, case_sensitive: bool) -> Tuple[str, Any]: + def primary_key_cells(self, row: Row, case_sensitive: bool) -> Tuple[Any]: """Create a tuple containg all cells related to primary_key""" return tuple( row[label]