From e389c7b2a04c423033076af6d73351235370be26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 31 Oct 2025 17:55:59 +0200 Subject: [PATCH] Annotate pycurl's getinfo() and getinfo_raw() (#14929) --- stubs/pycurl/pycurl.pyi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stubs/pycurl/pycurl.pyi b/stubs/pycurl/pycurl.pyi index 36a44e6ec..f5920dd85 100644 --- a/stubs/pycurl/pycurl.pyi +++ b/stubs/pycurl/pycurl.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import Incomplete -from typing import Final, final +from typing import Any, Final, final from typing_extensions import Self version: str @@ -22,8 +22,10 @@ class Curl: def perform(self) -> None: ... def perform_rb(self) -> bytes: ... def perform_rs(self) -> str: ... - def getinfo(self, info): ... - def getinfo_raw(self, info): ... + # For getinfo and getinfo_raw, the exact return type depends on the passed value: + # http://pycurl.io/docs/latest/curlobject.html#pycurl.Curl.getinfo + def getinfo(self, info: int) -> Any: ... + def getinfo_raw(self, info: int) -> Any: ... def reset(self) -> None: ... def unsetopt(self, option: int): ... def pause(self, bitmask): ...