Skip to content

Commit f518555

Browse files
authored
attempt to work around flake and pyright errors
1 parent 6670f93 commit f518555

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gguf-py/gguf/gguf_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ class ReaderField(NamedTuple):
5656

5757
def contents(self, index_or_slice: int | slice = slice(None)) -> Any:
5858
if self.types:
59-
to_string = lambda x: str(x.tobytes(), encoding='utf-8')
59+
to_string = lambda x: str(x.tobytes(), encoding='utf-8') # noqa: E731
6060
main_type = self.types[0]
6161

6262
if main_type == GGUFValueType.ARRAY:
6363
sub_type = self.types[-1]
6464

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

6868
if isinstance(index_or_slice, int):
6969
return to_string(self.parts[indices])

0 commit comments

Comments
 (0)