Skip to content

Commit 2f448f3

Browse files
committed
use literal[0, 1] for input bool
1 parent d3d2ed6 commit 2f448f3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

stubs/pywin32/pythonwin/win32ui.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def CreateControl(
3030
parent: _win32typing.PyCWnd,
3131
id: int,
3232
obPersist: Unused = None,
33-
bStorage: bool | int = False,
33+
bStorage: bool | Literal[0, 1] = False,
3434
licKey: str | None = None,
3535
/,
3636
) -> _win32typing.PyCWnd: ...
@@ -45,7 +45,7 @@ def CreateDialogIndirect(
4545
) -> _win32typing.PyCDialog: ...
4646
def CreatePrintDialog(
4747
idRes: int,
48-
bPrintSetupOnly: bool | int = False,
48+
bPrintSetupOnly: bool | Literal[0, 1] = False,
4949
dwFlags: int = ...,
5050
parent: _win32typing.PyCWnd | None = None,
5151
dll: _win32typing.PyDLL | None = None,
@@ -179,7 +179,7 @@ def SetDialogBkColor(clrCtlBk: int = ..., clrCtlText: int = ..., /) -> None: ...
179179
def SetProfileFileName(filename: str, /) -> None: ...
180180
def SetRegistryKey(key: str, /) -> None: ...
181181
def SetResource(dll: _win32typing.PyDLL, /) -> _win32typing.PyDLL: ...
182-
def SetStatusText(msg: str, bForce: bool | int = False, /) -> None: ...
182+
def SetStatusText(msg: str, bForce: bool | Literal[0, 1] = False, /) -> None: ...
183183
def StartDebuggerPump() -> None: ...
184184
def StopDebuggerPump() -> None: ...
185185
def TranslateMessage(msg: tuple[int, int, int, int, int, tuple[int, int]]) -> int: ...
@@ -189,7 +189,7 @@ def WriteProfileVal(section: str, entry: str, value: str | int, /) -> int: ...
189189
def AddToRecentFileList(fileName: str, /) -> None: ...
190190

191191
@overload
192-
def CreateImageList(cx: int, cy: int, mask: bool | int, initial: int, grow: int, /) -> _win32typing.PyCImagelist: ...
192+
def CreateImageList(cx: int, cy: int, mask: bool | Literal[0, 1], initial: int, grow: int, /) -> _win32typing.PyCImagelist: ...
193193
@overload
194194
def CreateImageList(
195195
bitmapId: int | str | _win32typing.PyResourceId, cx: int, grow: int, crMask: int, /

0 commit comments

Comments
 (0)