From 00e3b6fc680b774463ed146edc7fa4efad8bb8bd Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Thu, 23 Mar 2023 03:05:27 -0700 Subject: [PATCH] Add alternate type for cffi's from_buffer (#9925) --- stubs/cffi/cffi/api.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/cffi/cffi/api.pyi b/stubs/cffi/cffi/api.pyi index c95a5b358..cfb26ef92 100644 --- a/stubs/cffi/cffi/api.pyi +++ b/stubs/cffi/cffi/api.pyi @@ -46,9 +46,9 @@ class FFI: @overload def from_buffer(self, cdecl: WriteableBuffer, require_writable: Literal[True]) -> CData: ... @overload - def from_buffer(self, cdecl: str, python_buffer: ReadableBuffer, require_writable: Literal[False] = ...) -> CData: ... + def from_buffer(self, cdecl: str | CType, python_buffer: ReadableBuffer, require_writable: Literal[False] = ...) -> CData: ... @overload - def from_buffer(self, cdecl: str, python_buffer: WriteableBuffer, require_writable: Literal[True]) -> CData: ... + def from_buffer(self, cdecl: str | CType, python_buffer: WriteableBuffer, require_writable: Literal[True]) -> CData: ... def memmove(self, dest: CData | WriteableBuffer, src: CData | ReadableBuffer, n: int) -> None: ... @overload def callback(