Skip to content

Commit 470185d

Browse files
committed
chore(typing): ignore pyright argument type report
pyright reports the following, which we consider safe to ignore and easier than retyping 'whence' and unravelling a whole lot of subsequent typing issues. /home/runner/work/unblob/unblob/python/unblob/file_utils.py:73:31 - error: Argument of type "int" cannot be assigned to parameter "whence" of type "Literal[0, 1, 2, 3, 4]" in function "seek" Type "int" is not assignable to type "Literal[0, 1, 2, 3, 4]" "int" is not assignable to type "Literal[0]" "int" is not assignable to type "Literal[1]" "int" is not assignable to type "Literal[2]" "int" is not assignable to type "Literal[3]" "int" is not assignable to type "Literal[4]" (reportArgumentType)
1 parent 32b3ca2 commit 470185d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/unblob/file_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def from_path(cls, path: Path, access=mmap.ACCESS_READ):
7070

7171
def seek(self, pos: int, whence: int = os.SEEK_SET) -> int: # pyright: ignore[reportIncompatibleMethodOverride]
7272
try:
73-
super().seek(pos, whence)
73+
super().seek(pos, whence) # pyright: ignore[reportArgumentType]
7474
except ValueError as e:
7575
raise SeekError from e
7676
return self.tell()

0 commit comments

Comments
 (0)