From e7a0f717903eaa65f4881d61ce3b7552acc203fe Mon Sep 17 00:00:00 2001 From: ankm20 <72892644+ankm20@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:34:28 -0700 Subject: [PATCH] cffi: fix FFI.string signature (#10012) Keeps _cffi_backend.pyi consistent with api.pyi --- stubs/cffi/_cffi_backend.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/cffi/_cffi_backend.pyi b/stubs/cffi/_cffi_backend.pyi index 1b3d8f20e..5724b092d 100644 --- a/stubs/cffi/_cffi_backend.pyi +++ b/stubs/cffi/_cffi_backend.pyi @@ -203,7 +203,7 @@ class FFI: def offsetof(self, __cdecl: str | CType, __field_or_index: str | int, *__fields_or_indexes: str | int) -> int: ... def release(self, __cdata: CData) -> None: ... def sizeof(self, __cdecl: str | CType | CData) -> int: ... - def string(self, cdata: CData, maxlen: int) -> bytes | str: ... + def string(self, cdata: CData, maxlen: int = -1) -> bytes | str: ... def typeof(self, cdecl: str | CData) -> CType: ... def unpack(self, cdata: CData, length: int) -> bytes | str | list[Any]: ...