Skip to content

Commit fb99849

Browse files
committed
[pywin32] Add type_check_only
1 parent 466f4f2 commit fb99849

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

stubs/pywin32/win32/lib/win32gui_struct.pyi

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
from _typeshed import Incomplete, ReadableBuffer
22
from array import array
3-
from typing import NamedTuple
3+
from typing import NamedTuple, type_check_only
44

55
is64bit: bool
66

7+
@type_check_only
78
class _WMNOTIFY(NamedTuple):
89
hwndFrom: Incomplete
910
idFrom: Incomplete
1011
code: Incomplete
1112

1213
def UnpackWMNOTIFY(lparam: int) -> _WMNOTIFY: ...
13-
14+
@type_check_only
1415
class _NMITEMACTIVATE(NamedTuple):
1516
hwndFrom: Incomplete
1617
idFrom: Incomplete
@@ -37,7 +38,7 @@ def PackMENUITEMINFO(
3738
hbmpItem: Incomplete | None = ...,
3839
dwTypeData: Incomplete | None = ...,
3940
) -> tuple[array[int], list[Incomplete]]: ...
40-
41+
@type_check_only
4142
class _MENUITEMINFO(NamedTuple):
4243
fType: int | None
4344
fState: int | None
@@ -59,7 +60,7 @@ def PackMENUINFO(
5960
dwMenuData: Incomplete | None = ...,
6061
fMask: int = ...,
6162
) -> array[int]: ...
62-
63+
@type_check_only
6364
class _MENUINFO(NamedTuple):
6465
dwStyle: Incomplete | None
6566
cyMax: Incomplete | None
@@ -72,7 +73,7 @@ def EmptyMENUINFO(mask: Incomplete | None = ...) -> array[int]: ...
7273
def PackTVINSERTSTRUCT(parent, insertAfter, tvitem) -> tuple[bytes, list[Incomplete]]: ...
7374
def PackTVITEM(hitem, state, stateMask, text, image, selimage, citems, param) -> tuple[array[int], list[Incomplete]]: ...
7475
def EmptyTVITEM(hitem, mask: Incomplete | None = ..., text_buf_size: int = ...) -> tuple[array[int], list[Incomplete]]: ...
75-
76+
@type_check_only
7677
class _TVITEM(NamedTuple):
7778
item_hItem: Incomplete
7879
item_state: Incomplete | None
@@ -84,7 +85,7 @@ class _TVITEM(NamedTuple):
8485
item_param: Incomplete | None
8586

8687
def UnpackTVITEM(buffer: ReadableBuffer) -> _TVITEM: ...
87-
88+
@type_check_only
8889
class _TVNOTIFY(NamedTuple):
8990
hwndFrom: Incomplete
9091
id: Incomplete
@@ -94,7 +95,7 @@ class _TVNOTIFY(NamedTuple):
9495
item_new: _TVITEM
9596

9697
def UnpackTVNOTIFY(lparam: int) -> _TVNOTIFY: ...
97-
98+
@type_check_only
9899
class _TVDISPINFO(NamedTuple):
99100
hwndFrom: Incomplete
100101
id: Incomplete
@@ -112,7 +113,7 @@ def PackLVITEM(
112113
param: Incomplete | None = ...,
113114
indent: Incomplete | None = ...,
114115
) -> tuple[array[int], list[Incomplete]]: ...
115-
116+
@type_check_only
116117
class _LVITEM(NamedTuple):
117118
item_item: Incomplete
118119
item_subItem: Incomplete
@@ -124,15 +125,15 @@ class _LVITEM(NamedTuple):
124125
item_indent: Incomplete | None
125126

126127
def UnpackLVITEM(buffer: ReadableBuffer) -> _LVITEM: ...
127-
128+
@type_check_only
128129
class _LVDISPINFO(NamedTuple):
129130
hwndFrom: Incomplete
130131
id: Incomplete
131132
code: Incomplete
132133
item: _LVITEM
133134

134135
def UnpackLVDISPINFO(lparam: int) -> _LVDISPINFO: ...
135-
136+
@type_check_only
136137
class _UnpackLVNOTIFY(NamedTuple):
137138
hwndFrom: Incomplete
138139
id: Incomplete
@@ -157,7 +158,7 @@ def PackLVCOLUMN(
157158
image: Incomplete | None = ...,
158159
order: Incomplete | None = ...,
159160
) -> tuple[array[int], list[Incomplete]]: ...
160-
161+
@type_check_only
161162
class _LVCOLUMN(NamedTuple):
162163
fmt: Incomplete | None
163164
cx: Incomplete | None
@@ -169,7 +170,7 @@ class _LVCOLUMN(NamedTuple):
169170
def UnpackLVCOLUMN(lparam: ReadableBuffer) -> _LVCOLUMN: ...
170171
def EmptyLVCOLUMN(mask: Incomplete | None = ..., text_buf_size: int = ...) -> tuple[array[int], list[Incomplete]]: ...
171172
def PackLVHITTEST(pt) -> tuple[array[int], None]: ...
172-
173+
@type_check_only
173174
class _LVHITTEST(NamedTuple):
174175
pt: tuple[Incomplete, Incomplete]
175176
flags: Incomplete

0 commit comments

Comments
 (0)