mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-16 15:02:26 +08:00
stdlib: add argument default values (#9501)
This commit is contained in:
@@ -25,11 +25,11 @@ class CDLL:
|
||||
def __init__(
|
||||
self,
|
||||
name: str | None,
|
||||
mode: int = ...,
|
||||
handle: int | None = ...,
|
||||
use_errno: bool = ...,
|
||||
use_last_error: bool = ...,
|
||||
winmode: int | None = ...,
|
||||
mode: int = 4,
|
||||
handle: int | None = None,
|
||||
use_errno: bool = False,
|
||||
use_last_error: bool = False,
|
||||
winmode: int | None = None,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
@@ -136,11 +136,11 @@ def byref(obj: _CData, offset: int = ...) -> _CArgObject: ...
|
||||
_CastT = TypeVar("_CastT", bound=_CanCastTo)
|
||||
|
||||
def cast(obj: _CData | _CArgObject | int, typ: type[_CastT]) -> _CastT: ...
|
||||
def create_string_buffer(init: int | bytes, size: int | None = ...) -> Array[c_char]: ...
|
||||
def create_string_buffer(init: int | bytes, size: int | None = None) -> Array[c_char]: ...
|
||||
|
||||
c_buffer = create_string_buffer
|
||||
|
||||
def create_unicode_buffer(init: int | str, size: int | None = ...) -> Array[c_wchar]: ...
|
||||
def create_unicode_buffer(init: int | str, size: int | None = None) -> Array[c_wchar]: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
def DllCanUnloadNow() -> int: ...
|
||||
@@ -178,12 +178,12 @@ if sys.platform == "win32":
|
||||
def set_last_error(value: int) -> int: ...
|
||||
|
||||
def sizeof(obj_or_type: _CData | type[_CData]) -> int: ...
|
||||
def string_at(address: _CVoidConstPLike, size: int = ...) -> bytes: ...
|
||||
def string_at(address: _CVoidConstPLike, size: int = -1) -> bytes: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
def WinError(code: int | None = ..., descr: str | None = ...) -> OSError: ...
|
||||
|
||||
def wstring_at(address: _CVoidConstPLike, size: int = ...) -> str: ...
|
||||
def wstring_at(address: _CVoidConstPLike, size: int = -1) -> str: ...
|
||||
|
||||
class _SimpleCData(Generic[_T], _CData):
|
||||
value: _T
|
||||
|
||||
Reference in New Issue
Block a user