Skip to content

Commit

Permalink
Refacto: Fix signature 'primary_key_cells' method and remove useless …
Browse files Browse the repository at this point in the history
…'type: ignore'
  • Loading branch information
amelie-rondot committed Feb 14, 2024
1 parent 1c60085 commit 64cd4c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frictionless/resources/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 64cd4c3

Please sign in to comment.