From 07ffb67b924d5f532f8b8b72a4902f58faae6aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Ochagav=C3=ADa?= Date: Fri, 6 Mar 2026 05:57:19 -0300 Subject: [PATCH] [cffi] Accept floats in `cast` (#15487) --- stubs/cffi/cffi/api.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/cffi/cffi/api.pyi b/stubs/cffi/cffi/api.pyi index 07e9ffcca..7280934df 100644 --- a/stubs/cffi/cffi/api.pyi +++ b/stubs/cffi/cffi/api.pyi @@ -43,7 +43,7 @@ class FFI: free: Callable[[CData], Any] | None = None, should_clear_after_alloc: bool = True, ) -> _cffi_backend._Allocator: ... - def cast(self, cdecl: str | CType, source: CData | int) -> CData: ... + def cast(self, cdecl: str | CType, source: CData | float) -> CData: ... def string(self, cdata: CData, maxlen: int = -1) -> bytes | str: ... def unpack(self, cdata: CData, length: int) -> bytes | str | list[Any]: ... @overload