Skip to content

Commit 3aa339a

Browse files
authored
give up, ignore type
1 parent e90e0c7 commit 3aa339a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

gguf-py/gguf/gguf_reader.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,12 @@ def contents(self, index_or_slice: int | slice = slice(None)) -> Any:
6363
sub_type = self.types[-1]
6464

6565
if sub_type == GGUFValueType.STRING:
66-
indices: int | list[int] = self.data[index_or_slice]
66+
indices = self.data[index_or_slice]
6767

6868
if isinstance(index_or_slice, int):
69-
idx: int = indices
70-
return to_string(self.parts[idx])
69+
return to_string(self.parts[indices]) # type: ignore
7170
else:
72-
idxlist: list[int] = indices
73-
return [to_string(self.parts[idx]) for idx in idxlist]
71+
return [to_string(self.parts[idx]) for idx in indices] # type: ignore
7472
else:
7573
# FIXME: When/if _get_field_parts() support multi-dimensional arrays, this must do so too
7674

0 commit comments

Comments
 (0)