Skip to content

Commit 1ae4ada

Browse files
authored
Fix ctypes.FormatError code parameter to be optional (python#6635)
1 parent 3008032 commit 1ae4ada

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎stdlib/@python2/ctypes/__init__.pyi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def create_unicode_buffer(init: _UnionT[int, Text], size: int | None = ...) -> A
150150
if sys.platform == "win32":
151151
def DllCanUnloadNow() -> int: ...
152152
def DllGetClassObject(rclsid: Any, riid: Any, ppv: Any) -> int: ... # TODO not documented
153-
def FormatError(code: int) -> str: ...
153+
def FormatError(code: int = ...) -> str: ...
154154
def GetLastError() -> int: ...
155155

156156
def get_errno() -> int: ...

‎stdlib/ctypes/__init__.pyi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def create_unicode_buffer(init: int | str, size: int | None = ...) -> Array[c_wc
158158
if sys.platform == "win32":
159159
def DllCanUnloadNow() -> int: ...
160160
def DllGetClassObject(rclsid: Any, riid: Any, ppv: Any) -> int: ... # TODO not documented
161-
def FormatError(code: int) -> str: ...
161+
def FormatError(code: int = ...) -> str: ...
162162
def GetLastError() -> int: ...
163163

164164
def get_errno() -> int: ...

0 commit comments

Comments
 (0)