comtypes 1.4.7__zip → 1.4.9__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. {comtypes-1.4.7 → comtypes-1.4.9}/CHANGES.txt +39 -0
  2. {comtypes-1.4.7/comtypes.egg-info → comtypes-1.4.9}/PKG-INFO +6 -4
  3. {comtypes-1.4.7 → comtypes-1.4.9}/README.md +5 -3
  4. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/GUID.py +6 -5
  5. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/__init__.py +16 -5
  6. comtypes-1.4.9/comtypes/_comobject.py +507 -0
  7. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/_memberspec.py +81 -9
  8. comtypes-1.4.9/comtypes/_meta.py +95 -0
  9. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/_npsupport.py +2 -1
  10. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/_post_coinit/__init__.py +1 -0
  11. comtypes-1.4.9/comtypes/_post_coinit/_cominterface_meta_patcher.py +153 -0
  12. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/_post_coinit/misc.py +21 -40
  13. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/_post_coinit/unknwn.py +88 -209
  14. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/_safearray.py +1 -2
  15. comtypes-1.4.9/comtypes/_vtbl.py +448 -0
  16. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/automation.py +36 -45
  17. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/client/__init__.py +21 -31
  18. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/client/_code_cache.py +5 -4
  19. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/client/_constants.py +1 -1
  20. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/client/_events.py +1 -2
  21. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/client/_generate.py +9 -13
  22. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/client/lazybind.py +2 -7
  23. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/errorinfo.py +3 -3
  24. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/git.py +2 -2
  25. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/hints.pyi +11 -19
  26. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/persist.py +7 -7
  27. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/safearray.py +12 -6
  28. comtypes-1.4.9/comtypes/server/__init__.py +86 -0
  29. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/server/inprocserver.py +22 -17
  30. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/server/localserver.py +28 -16
  31. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/server/register.py +62 -73
  32. comtypes-1.4.9/comtypes/server/w_getopt.py +48 -0
  33. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/shelllink.py +49 -67
  34. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/TestComServer.py +1 -1
  35. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/TestDispServer.py +1 -1
  36. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/__init__.py +9 -12
  37. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/find_memleak.py +0 -1
  38. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_BSTR.py +4 -7
  39. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_agilent.py +0 -1
  40. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_avmc.py +1 -1
  41. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_casesensitivity.py +3 -5
  42. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_clear_cache.py +1 -0
  43. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_collections.py +3 -3
  44. comtypes-1.4.9/comtypes/test/test_comobject.py +146 -0
  45. comtypes-1.4.9/comtypes/test/test_comserver.py +319 -0
  46. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_createwrappers.py +2 -6
  47. comtypes-1.4.9/comtypes/test/test_dispinterface.py +153 -0
  48. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_excel.py +22 -13
  49. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_ie.py +2 -5
  50. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_inout_args.py +8 -5
  51. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_midl_safearray_create.py +9 -1
  52. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_outparam.py +17 -10
  53. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_safearray.py +1 -90
  54. comtypes-1.4.9/comtypes/test/test_server.py +350 -0
  55. comtypes-1.4.9/comtypes/test/test_server_register.py +536 -0
  56. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_shelllink.py +10 -14
  57. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_showevents.py +7 -17
  58. comtypes-1.4.9/comtypes/test/test_stream.py +131 -0
  59. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_typeannotator.py +1 -1
  60. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_urlhistory.py +1 -0
  61. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_variant.py +0 -19
  62. comtypes-1.4.9/comtypes/test/test_w_getopt.py +29 -0
  63. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_win32com_interop.py +80 -36
  64. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_wmi.py +0 -3
  65. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/codegenerator/codegenerator.py +62 -68
  66. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/codegenerator/helpers.py +8 -8
  67. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/codegenerator/namespaces.py +97 -27
  68. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/codegenerator/packing.py +4 -4
  69. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/codegenerator/typeannotator.py +9 -11
  70. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/tlbparser.py +33 -32
  71. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/typedesc.py +3 -8
  72. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/typeinfo.py +32 -47
  73. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/util.py +1 -0
  74. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/viewobject.py +1 -5
  75. {comtypes-1.4.7 → comtypes-1.4.9/comtypes.egg-info}/PKG-INFO +6 -4
  76. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes.egg-info/SOURCES.txt +6 -3
  77. comtypes-1.4.9/pyproject.toml +55 -0
  78. comtypes-1.4.7/comtypes/_comobject.py +0 -834
  79. comtypes-1.4.7/comtypes/_idl_stuff.py +0 -67
  80. comtypes-1.4.7/comtypes/_meta.py +0 -70
  81. comtypes-1.4.7/comtypes/server/__init__.py +0 -69
  82. comtypes-1.4.7/comtypes/server/w_getopt.py +0 -75
  83. comtypes-1.4.7/comtypes/test/test_comserver.py +0 -239
  84. comtypes-1.4.7/comtypes/test/test_dispinterface.py +0 -138
  85. comtypes-1.4.7/comtypes/test/test_propputref.py +0 -40
  86. comtypes-1.4.7/comtypes/test/test_server.py +0 -348
  87. comtypes-1.4.7/comtypes/test/test_stream.py +0 -53
  88. comtypes-1.4.7/pyproject.toml +0 -3
  89. {comtypes-1.4.7 → comtypes-1.4.9}/LICENSE.txt +0 -0
  90. {comtypes-1.4.7 → comtypes-1.4.9}/MANIFEST.in +0 -0
  91. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/_post_coinit/bstr.py +0 -0
  92. /comtypes-1.4.7/comtypes/_py_instance_method.py → /comtypes-1.4.9/comtypes/_post_coinit/instancemethod.py +0 -0
  93. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/_tlib_version_checker.py +0 -0
  94. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/clear_cache.py +0 -0
  95. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/client/dynamic.py +0 -0
  96. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/connectionpoints.py +0 -0
  97. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/hresult.py +0 -0
  98. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/logutil.py +0 -0
  99. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/messageloop.py +0 -0
  100. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/patcher.py +0 -0
  101. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/server/automation.py +0 -0
  102. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/server/connectionpoints.py +0 -0
  103. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/stream.py +0 -0
  104. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/TestComServer.idl +0 -0
  105. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/TestComServer.tlb +0 -0
  106. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/TestDispServer.idl +0 -0
  107. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/TestDispServer.tlb +0 -0
  108. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/mylib.idl +0 -0
  109. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/mylib.tlb +0 -0
  110. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/mytypelib.idl +0 -0
  111. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/runtests.py +0 -0
  112. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/setup.py +0 -0
  113. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_DISPPARAMS.py +0 -0
  114. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_GUID.py +0 -0
  115. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_QueryService.py +0 -0
  116. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_basic.py +0 -0
  117. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_client.py +0 -0
  118. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_client_dynamic.py +0 -0
  119. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_client_regenerate_modules.py +0 -0
  120. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_dict.py +0 -0
  121. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_dispifc_records.py +0 -0
  122. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_dispifc_safearrays.py +0 -0
  123. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_dyndispatch.py +0 -0
  124. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_findgendir.py +0 -0
  125. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_getactiveobj.py +0 -0
  126. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_ienum.py +0 -0
  127. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_imfattributes.py +0 -0
  128. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_jscript.js +0 -0
  129. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_monikers.py +0 -0
  130. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_msscript.py +0 -0
  131. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_npsupport.py +0 -0
  132. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_persist.py +0 -0
  133. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_pump_events.py +0 -0
  134. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_recordinfo.py +0 -0
  135. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_sapi.py +0 -0
  136. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_storage.py +0 -0
  137. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_subinterface.py +0 -0
  138. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_typeinfo.py +0 -0
  139. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/test_word.py +0 -0
  140. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/test/urlhist.tlb +0 -0
  141. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/__init__.py +0 -0
  142. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/codegenerator/__init__.py +0 -0
  143. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/codegenerator/modulenamer.py +0 -0
  144. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes/tools/typedesc_base.py +0 -0
  145. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes.egg-info/dependency_links.txt +0 -0
  146. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes.egg-info/entry_points.txt +0 -0
  147. {comtypes-1.4.7 → comtypes-1.4.9}/comtypes.egg-info/top_level.txt +0 -0
  148. {comtypes-1.4.7 → comtypes-1.4.9}/setup.cfg +0 -0
  149. {comtypes-1.4.7 → comtypes-1.4.9}/setup.py +0 -0
@@ -25,20 +25,20 @@ def _calc_packing(struct, fields, pack, isStruct):
25
25
  size += a - size % a
26
26
  if isStruct:
27
27
  if size != f.offset:
28
- raise PackingError("field %s offset (%s/%s)" % (f.name, size, f.offset))
28
+ raise PackingError(f"field {f.name} offset ({size}/{f.offset})")
29
29
  size += s
30
30
  else:
31
31
  size = max(size, s)
32
32
  total_align = max(total_align, a)
33
33
  if total_align != struct.align:
34
- raise PackingError("total alignment (%s/%s)" % (total_align, struct.align))
34
+ raise PackingError(f"total alignment ({total_align}/{struct.align})")
35
35
  a = total_align
36
36
  if pack is not None:
37
37
  a = min(pack, a)
38
38
  if size % a:
39
39
  size += a - size % a
40
40
  if size != struct.size:
41
- raise PackingError("total size (%s/%s)" % (size, struct.size))
41
+ raise PackingError(f"total size ({size}/{struct.size})")
42
42
 
43
43
 
44
44
  def calc_packing(struct, fields):
@@ -55,7 +55,7 @@ def calc_packing(struct, fields):
55
55
 
56
56
  return int(pack / 8)
57
57
 
58
- raise PackingError("PACKING FAILED: %s" % details)
58
+ raise PackingError(f"PACKING FAILED: {details}")
59
59
 
60
60
 
61
61
  class PackingError(Exception):
@@ -1,19 +1,19 @@
1
1
  import abc
2
2
  import keyword
3
- from typing import Any, Generic, TypeVar, TYPE_CHECKING
3
+ from typing import Any, Generic, Protocol, TypeVar
4
4
  from typing import Dict, List, Optional, Sequence, Tuple
5
5
  from typing import Iterable, Iterator
6
6
 
7
7
  from comtypes.tools import typedesc
8
8
 
9
- if TYPE_CHECKING:
10
- from comtypes import hints
11
9
 
10
+ class _MethodTypeDesc(Protocol):
11
+ arguments: List[Tuple[Any, str, List[str], Optional[Any]]]
12
+ idlflags: List[str]
13
+ name: str
12
14
 
13
- if TYPE_CHECKING:
14
- _T_MTD = TypeVar("_T_MTD", bound=hints._MethodTypeDesc)
15
- else:
16
- _T_MTD = TypeVar("_T_MTD")
15
+
16
+ _T_MTD = TypeVar("_T_MTD", bound=_MethodTypeDesc)
17
17
 
18
18
 
19
19
  class _MethodAnnotator(abc.ABC, Generic[_T_MTD]):
@@ -33,8 +33,7 @@ class _MethodAnnotator(abc.ABC, Generic[_T_MTD]):
33
33
  return result
34
34
 
35
35
  @abc.abstractmethod
36
- def getvalue(self, name: str) -> str:
37
- ...
36
+ def getvalue(self, name: str) -> str: ...
38
37
 
39
38
 
40
39
  _CatMths = Tuple[ # categorized methods
@@ -47,8 +46,7 @@ class _MethodsAnnotator(abc.ABC, Generic[_T_MTD]):
47
46
  self.data: List[str] = []
48
47
 
49
48
  @abc.abstractmethod
50
- def to_method_annotator(self, method: _T_MTD) -> _MethodAnnotator[_T_MTD]:
51
- ...
49
+ def to_method_annotator(self, method: _T_MTD) -> _MethodAnnotator[_T_MTD]: ...
52
50
 
53
51
  def _iter_methods(self, members: Iterable[_T_MTD]) -> Iterator[_CatMths[_T_MTD]]:
54
52
  methods: Dict[str, List[Optional[_T_MTD]]] = {}
@@ -34,6 +34,7 @@ longlong_type = typedesc.FundamentalType("long long int", 64, 64)
34
34
  ulonglong_type = typedesc.FundamentalType("long long unsigned int", 64, 64)
35
35
  float_type = typedesc.FundamentalType("float", 32, 32)
36
36
  double_type = typedesc.FundamentalType("double", 64, 64)
37
+ void_type = typedesc.FundamentalType("void", 0, 0)
37
38
 
38
39
  # basic COM data types
39
40
  BSTR_type = typedesc.Typedef("BSTR", PTR(wchar_t_type))
@@ -89,7 +90,7 @@ COMTYPES = {
89
90
  automation.VT_UI8: ulonglong_type, # 21
90
91
  automation.VT_INT: int_type, # 22
91
92
  automation.VT_UINT: uint_type, # 23
92
- automation.VT_VOID: typedesc.FundamentalType("void", 0, 0), # 24
93
+ automation.VT_VOID: void_type, # 24
93
94
  automation.VT_HRESULT: HRESULT_type, # 25
94
95
  automation.VT_LPSTR: PTR(char_type), # 30
95
96
  automation.VT_LPWSTR: PTR(wchar_t_type), # 31
@@ -126,20 +127,18 @@ class Parser(object):
126
127
  )
127
128
  return typ
128
129
  elif tdesc.vt == automation.VT_PTR:
129
- ptrdesc: typeinfo.TYPEDESC = tdesc._.lptdesc[0]
130
- typ = self.make_type(ptrdesc, tinfo)
131
- return PTR(typ)
130
+ return PTR(self.make_type(tdesc._.lptdesc[0], tinfo))
132
131
  elif tdesc.vt == automation.VT_USERDEFINED:
133
132
  try:
134
133
  ti = tinfo.GetRefTypeInfo(tdesc._.hreftype)
135
134
  except COMError as details:
136
- type_name = "__error_hreftype_%d__" % tdesc._.hreftype
135
+ type_name = f"__error_hreftype_{tdesc._.hreftype:d}__"
137
136
  tlib_name = get_tlib_filename(self.tlib)
138
137
  if tlib_name is None:
139
138
  tlib_name = "unknown typelib"
140
139
  message = (
141
- "\n\tGetRefTypeInfo failed in %s: %s\n\tgenerating type '%s' instead"
142
- % (tlib_name, details, type_name)
140
+ f"\n\tGetRefTypeInfo failed in {tlib_name}: {details}"
141
+ f"\n\tgenerating type '{type_name}' instead"
143
142
  )
144
143
  import warnings
145
144
 
@@ -153,8 +152,7 @@ class Parser(object):
153
152
  return result
154
153
  elif tdesc.vt == automation.VT_SAFEARRAY:
155
154
  # SAFEARRAY(<type>), see Don Box pp.331f
156
- safearraydesc: typeinfo.TYPEDESC = tdesc._.lptdesc[0]
157
- return midlSAFEARRAY(self.make_type(safearraydesc, tinfo))
155
+ return midlSAFEARRAY(self.make_type(tdesc._.lptdesc[0], tinfo))
158
156
  raise NotImplementedError(tdesc.vt)
159
157
 
160
158
  ################################################################
@@ -271,7 +269,7 @@ class Parser(object):
271
269
  # Don't known what artefact that is - we ignore it.
272
270
  # It's an interface without methods anyway.
273
271
  if itf_name != "IOleControlTypes":
274
- message = "Ignoring interface %s which has no base interface" % itf_name
272
+ message = f"Ignoring interface {itf_name} which has no base interface"
275
273
  import warnings
276
274
 
277
275
  warnings.warn(message, UserWarning)
@@ -591,33 +589,26 @@ class Parser(object):
591
589
  self, name: Optional[str], value: Any, tlib: Optional[typeinfo.ITypeLib] = None
592
590
  ) -> None:
593
591
  modname = self._typelib_module(tlib)
594
- fullname = "%s.%s" % (modname, name)
592
+ fullname = f"{modname}.{name}"
595
593
  if fullname in self.items:
596
594
  # XXX Can we really allow this? It happens, at least.
597
595
  if isinstance(value, typedesc.External):
598
596
  return
599
597
  # BUG: We try to register an item that's already registered.
600
- raise ValueError("Bug: Multiple registered name '%s': %r" % (name, value))
598
+ raise ValueError(f"Bug: Multiple registered name '{name}': {value!r}")
601
599
  self.items[fullname] = value
602
600
 
603
601
  def parse_typeinfo(self, tinfo: typeinfo.ITypeInfo) -> Any:
604
602
  name = tinfo.GetDocumentation(-1)[0]
605
603
  modname = self._typelib_module()
606
604
  try:
607
- return self.items["%s.%s" % (modname, name)]
605
+ return self.items[f"{modname}.{name}"]
608
606
  except KeyError:
609
607
  pass
610
608
 
611
609
  tlib = tinfo.GetContainingTypeLib()[0]
612
610
  if tlib != self.tlib:
613
- ta = tinfo.GetTypeAttr()
614
- size = ta.cbSizeInstance * 8
615
- align = ta.cbAlignment * 8
616
- typ = typedesc.External(
617
- tlib, name, size, align, tlib.GetDocumentation(-1)[:2]
618
- )
619
- self._register(name, typ, tlib)
620
- return typ
611
+ return self._parse_External(name, tlib, tinfo)
621
612
 
622
613
  ta = tinfo.GetTypeAttr()
623
614
  tkind = ta.typekind
@@ -638,10 +629,7 @@ class Parser(object):
638
629
  except COMError:
639
630
  # no dual interface
640
631
  return self.ParseDispatch(tinfo, ta)
641
- tinfo = tinfo.GetRefTypeInfo(href)
642
- ta = tinfo.GetTypeAttr()
643
- assert ta.typekind == typeinfo.TKIND_INTERFACE
644
- return self.ParseInterface(tinfo, ta)
632
+ return self._parse_DualInterface(tinfo.GetRefTypeInfo(href))
645
633
  elif tkind == typeinfo.TKIND_COCLASS: # 5
646
634
  return self.ParseCoClass(tinfo, ta)
647
635
  elif tkind == typeinfo.TKIND_ALIAS: # 6
@@ -652,6 +640,24 @@ class Parser(object):
652
640
  print("NYI", tkind)
653
641
  # raise "NYI", tkind
654
642
 
643
+ def _parse_DualInterface(
644
+ self, tinfo: typeinfo.ITypeInfo
645
+ ) -> Optional[typedesc.ComInterface]:
646
+ ta = tinfo.GetTypeAttr()
647
+ assert ta.typekind == typeinfo.TKIND_INTERFACE
648
+ return self.ParseInterface(tinfo, ta)
649
+
650
+ def _parse_External(
651
+ self, name: str, tlib: typeinfo.ITypeLib, tinfo: typeinfo.ITypeInfo
652
+ ) -> typedesc.External:
653
+ ta = tinfo.GetTypeAttr()
654
+ size = ta.cbSizeInstance * 8
655
+ align = ta.cbAlignment * 8
656
+ docs = tlib.GetDocumentation(-1)[:2]
657
+ typ = typedesc.External(tlib, name, size, align, docs)
658
+ self._register(name, typ, tlib)
659
+ return typ
660
+
655
661
  def parse_LibraryDescription(self):
656
662
  la = self.tlib.GetLibAttr()
657
663
  name, doc = self.tlib.GetDocumentation(-1)[:2]
@@ -731,18 +737,13 @@ class TypeLibParser(Parser):
731
737
  # path = r"c:\vc98\include\activscp.tlb"
732
738
 
733
739
 
734
- def get_tlib_filename(tlib):
740
+ def get_tlib_filename(tlib: typeinfo.ITypeLib) -> Optional[str]:
735
741
  # seems if the typelib is not registered, there's no way to
736
742
  # determine the filename.
737
743
  la = tlib.GetLibAttr()
738
744
  name = BSTR()
739
- try:
740
- windll.oleaut32.QueryPathOfRegTypeLib
741
- except AttributeError:
742
- # Windows CE doesn't have this function
743
- return None
744
745
  if 0 == windll.oleaut32.QueryPathOfRegTypeLib(
745
- byref(la.guid), la.wMajorVerNum, la.wMinorVerNum, 0, byref(name) # lcid
746
+ byref(la.guid), la.wMajorVerNum, la.wMinorVerNum, 0, byref(name)
746
747
  ):
747
748
  full_filename = name.value.split("\0")[0]
748
749
  if not os.path.isabs(full_filename):
@@ -20,12 +20,7 @@ class TypeLib(object):
20
20
  self.doc = doc
21
21
 
22
22
  def __repr__(self):
23
- return "<TypeLib(%s: %s, %s, %s)>" % (
24
- self.name,
25
- self.guid,
26
- self.major,
27
- self.minor,
28
- )
23
+ return f"<TypeLib({self.name}: {self.guid}, {self.major}, {self.minor})>"
29
24
 
30
25
 
31
26
  class Constant(object):
@@ -49,7 +44,7 @@ class External(object):
49
44
  name: str,
50
45
  size: int,
51
46
  align: int,
52
- docs: Optional[Tuple[str, str]] = None,
47
+ docs: Optional[Tuple[str, Optional[str]]] = None,
53
48
  ) -> None:
54
49
  # the type library containing the symbol
55
50
  self.tlib = tlib
@@ -238,7 +233,7 @@ _SourceInterfaces = Sequence[_Interface]
238
233
 
239
234
 
240
235
  def groupby_impltypeflags(
241
- seq: Sequence[Tuple[_Interface, _ImplTypeFlags]]
236
+ seq: Sequence[Tuple[_Interface, _ImplTypeFlags]],
242
237
  ) -> Tuple[_ImplementedInterfaces, _SourceInterfaces]:
243
238
  implemented = []
244
239
  sources = []
@@ -12,7 +12,7 @@ import weakref
12
12
 
13
13
  import ctypes
14
14
  from ctypes import HRESULT, POINTER, _Pointer, byref, c_int, c_void_p, c_wchar_p
15
- from ctypes.wintypes import DWORD, LONG, UINT, ULONG, WCHAR, WORD
15
+ from ctypes.wintypes import DWORD, LONG, UINT, ULONG, WCHAR, WORD, INT, SHORT, USHORT
16
16
  from comtypes import BSTR, _CData, COMMETHOD, GUID, IID, IUnknown, STDMETHOD
17
17
  from comtypes.automation import DISPID, LCID, SCODE
18
18
  from comtypes.automation import DISPPARAMS, EXCEPINFO, VARIANT, VARIANTARG, VARTYPE
@@ -28,15 +28,12 @@ is_64_bit = sys.maxsize > 2**32
28
28
 
29
29
  BOOL = c_int
30
30
  HREFTYPE = DWORD
31
- INT = c_int
32
31
  MEMBERID = DISPID
33
32
  OLECHAR = WCHAR
34
33
  PVOID = c_void_p
35
- SHORT = ctypes.c_short
36
34
  # See https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx#ULONG_PTR # noqa
37
35
  ULONG_PTR = ctypes.c_uint64 if is_64_bit else ctypes.c_ulong
38
36
 
39
- USHORT = ctypes.c_ushort
40
37
  LPOLESTR = POINTER(OLECHAR)
41
38
 
42
39
  ################################################################
@@ -231,7 +228,8 @@ class ITypeLib(IUnknown):
231
228
  def GetLibAttr(self) -> "TLIBATTR":
232
229
  """Return type library attributes"""
233
230
  return _deref_with_release(
234
- self._GetLibAttr(), self.ReleaseTLibAttr # type: ignore
231
+ self._GetLibAttr(), # type: ignore
232
+ self.ReleaseTLibAttr,
235
233
  )
236
234
 
237
235
  def IsName(self, name: str, lHashVal: int = 0) -> Optional[str]:
@@ -269,15 +267,9 @@ class ITypeLib(IUnknown):
269
267
 
270
268
 
271
269
  @overload
272
- def fix_name(name: None) -> None:
273
- pass
274
-
275
-
270
+ def fix_name(name: None) -> None: ...
276
271
  @overload
277
- def fix_name(name: str) -> str:
278
- pass
279
-
280
-
272
+ def fix_name(name: str) -> str: ...
281
273
  def fix_name(name):
282
274
  # Some typelibs contain BSTR with embedded NUL characters,
283
275
  # probably the len of the BSTR is wrong.
@@ -345,7 +337,8 @@ class ITypeInfo(IUnknown):
345
337
  def GetTypeAttr(self) -> "TYPEATTR":
346
338
  """Return the TYPEATTR for this type"""
347
339
  return _deref_with_release(
348
- self._GetTypeAttr(), self.ReleaseTypeAttr # type: ignore
340
+ self._GetTypeAttr(), # type: ignore
341
+ self.ReleaseTypeAttr,
349
342
  )
350
343
 
351
344
  def GetDocumentation(
@@ -358,13 +351,15 @@ class ITypeInfo(IUnknown):
358
351
  def GetFuncDesc(self, index: int) -> "FUNCDESC":
359
352
  """Return FUNCDESC for index"""
360
353
  return _deref_with_release(
361
- self._GetFuncDesc(index), self.ReleaseFuncDesc # type: ignore
354
+ self._GetFuncDesc(index), # type: ignore
355
+ self.ReleaseFuncDesc,
362
356
  )
363
357
 
364
358
  def GetVarDesc(self, index: int) -> "VARDESC":
365
359
  """Return VARDESC for index"""
366
360
  return _deref_with_release(
367
- self._GetVarDesc(index), self.ReleaseVarDesc # type: ignore
361
+ self._GetVarDesc(index), # type: ignore
362
+ self.ReleaseVarDesc,
368
363
  )
369
364
 
370
365
  def GetNames(self, memid: int, count: int = 1) -> List[str]:
@@ -481,25 +476,23 @@ class IRecordInfo(IUnknown):
481
476
  return result
482
477
 
483
478
  if TYPE_CHECKING:
484
- # fmt: off
485
479
  # def RecordInit
486
480
  # def RecordClear
487
- def RecordCopy( # noqa
481
+ def RecordCopy(
488
482
  self, pvExisting: hints.Incomplete, pvNew: hints.Incomplete
489
483
  ) -> hints.Hresult: ...
490
- def GetGuid(self) -> GUID: ... # noqa
491
- def GetName(self) -> str: ... # noqa
492
- def GetSize(self) -> int: ... # noqa
493
- def GetTypeInfo(self) -> ITypeInfo: ... # noqa
484
+ def GetGuid(self) -> GUID: ...
485
+ def GetName(self) -> str: ...
486
+ def GetSize(self) -> int: ...
487
+ def GetTypeInfo(self) -> ITypeInfo: ...
494
488
  # def GetField
495
489
  # def GetFieldNoCopy
496
490
  # def PutField
497
491
  # def PutFieldNoCopy
498
- def IsMatchingType(self, value: "IRecordInfo") -> bool: ... # noqa
492
+ def IsMatchingType(self, value: "IRecordInfo") -> bool: ...
499
493
  # def RecordCreate
500
- def RecordCreateCopy(self, pvSource: hints.Incomplete) -> int: ... # noqa
501
- def RecordDestroy(self, pvRecord: hints.Incomplete) -> hints.Hresult: ... # noqa
502
- # fmt: on
494
+ def RecordCreateCopy(self, pvSource: hints.Incomplete) -> int: ...
495
+ def RecordDestroy(self, pvRecord: hints.Incomplete) -> hints.Hresult: ...
503
496
 
504
497
 
505
498
  IRecordInfo._methods_ = [
@@ -636,7 +629,11 @@ def LoadTypeLib(szFile: str) -> ITypeLib:
636
629
 
637
630
 
638
631
  def UnRegisterTypeLib(
639
- libID: str, wVerMajor: int, wVerMinor: int, lcid: int = 0, syskind: int = SYS_WIN32
632
+ libID: str,
633
+ wVerMajor: int,
634
+ wVerMinor: int,
635
+ lcid: int = 0,
636
+ syskind: int = (SYS_WIN64 if is_64_bit else SYS_WIN32),
640
637
  ) -> int:
641
638
  """Unregister a registered type library"""
642
639
  return _oleaut32.UnRegisterTypeLib(
@@ -684,13 +681,7 @@ class tagTLIBATTR(ctypes.Structure):
684
681
  wLibFlags: int
685
682
 
686
683
  def __repr__(self):
687
- return "TLIBATTR(GUID=%s, Version=%s.%s, LCID=%s, FLags=0x%x)" % (
688
- self.guid,
689
- self.wMajorVerNum,
690
- self.wMinorVerNum,
691
- self.lcid,
692
- self.wLibFlags,
693
- )
684
+ return f"TLIBATTR(GUID={self.guid}, Version={self.wMajorVerNum}.{self.wMinorVerNum}, LCID={self.lcid}, FLags=0x{self.wLibFlags:x})"
694
685
 
695
686
 
696
687
  TLIBATTR = tagTLIBATTR
@@ -719,13 +710,7 @@ class tagTYPEATTR(ctypes.Structure):
719
710
  idldescType: "IDLDESC"
720
711
 
721
712
  def __repr__(self):
722
- return "TYPEATTR(GUID=%s, typekind=%s, funcs=%s, vars=%s, impltypes=%s)" % (
723
- self.guid,
724
- self.typekind,
725
- self.cFuncs,
726
- self.cVars,
727
- self.cImplTypes,
728
- )
713
+ return f"TYPEATTR(GUID={self.guid}, typekind={self.typekind}, funcs={self.cFuncs}, vars={self.cVars}, impltypes={self.cImplTypes})"
729
714
 
730
715
 
731
716
  TYPEATTR = tagTYPEATTR
@@ -749,14 +734,14 @@ class tagFUNCDESC(ctypes.Structure):
749
734
 
750
735
  def __repr__(self):
751
736
  return (
752
- "FUNCDESC("
737
+ f"FUNCDESC("
753
738
  f"memid={self.memid}, "
754
739
  f"cParams={self.cParams}, "
755
740
  f"cParamsOpt={self.cParamsOpt}, "
756
741
  f"callconv={self.callconv}, "
757
- f"invkind={self.invkind,}, "
742
+ f"invkind={self.invkind}, "
758
743
  f"funckind={self.funckind}"
759
- ")"
744
+ f")"
760
745
  )
761
746
 
762
747
 
@@ -1125,8 +1110,8 @@ tagTLIBATTR._fields_ = [
1125
1110
  class N11tagTYPEDESC5DOLLAR_203E(ctypes.Union):
1126
1111
  # C:/Programme/gccxml/bin/Vc71/PlatformSDK/oaidl.h 584
1127
1112
  if TYPE_CHECKING:
1128
- lptdesc: TYPEDESC
1129
- lpadesc: tagARRAYDESC
1113
+ lptdesc: _Pointer[tagTYPEDESC]
1114
+ lpadesc: _Pointer[tagARRAYDESC]
1130
1115
  hreftype: int
1131
1116
 
1132
1117
 
@@ -1175,7 +1160,7 @@ class N10tagVARDESC5DOLLAR_205E(ctypes.Union):
1175
1160
  # C:/Programme/gccxml/bin/Vc71/PlatformSDK/oaidl.h 807
1176
1161
  if TYPE_CHECKING:
1177
1162
  oInst: int
1178
- lpvarValue: VARIANT
1163
+ lpvarValue: _Pointer[VARIANT]
1179
1164
 
1180
1165
 
1181
1166
  N10tagVARDESC5DOLLAR_205E._fields_ = [
@@ -1,6 +1,7 @@
1
1
  """This module defines the funtions byref_at(cobj, offset)
2
2
  and cast_field(struct, fieldname, fieldtype).
3
3
  """
4
+
4
5
  from ctypes import *
5
6
 
6
7
 
@@ -61,11 +61,7 @@ class tagExtentInfo(Structure):
61
61
 
62
62
  def __repr__(self):
63
63
  size = (self.sizelProposed.cx, self.sizelProposed.cy)
64
- return "<ExtentInfo(mode=%s, size=%s) at %x>" % (
65
- self.dwExtentMode,
66
- size,
67
- id(self),
68
- )
64
+ return f"<ExtentInfo(mode={self.dwExtentMode}, size={size}) at {id(self):x}>"
69
65
 
70
66
 
71
67
  assert sizeof(tagExtentInfo) == 16, sizeof(tagExtentInfo)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: comtypes
3
- Version: 1.4.7
3
+ Version: 1.4.9
4
4
  Summary: Pure Python COM package
5
5
  Home-page: https://github.com/enthought/comtypes
6
6
  Download-URL: https://github.com/enthought/comtypes/releases
@@ -20,8 +20,9 @@ License-File: LICENSE.txt
20
20
  # comtypes
21
21
 
22
22
  ![Works on Windows only](https://img.shields.io/badge/-Windows-0078D6.svg?logo=windows&style=flat)
23
- [![PyPI version](https://badge.fury.io/py/comtypes.svg)](https://pypi.org/project/comtypes/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - License](https://img.shields.io/pypi/l/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/comtypes)](https://pypi.org/project/comtypes/)
24
- [![GitHub Repo stars](https://img.shields.io/github/stars/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/stargazers) [![GitHub forks](https://img.shields.io/github/forks/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/network/members)
23
+ [![PyPI version](https://badge.fury.io/py/comtypes.svg)](https://pypi.org/project/comtypes/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Python Requires](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpypi.org%2Fpypi%2Fcomtypes%2Fjson&query=info.requires_python&label=Python&nbsp;Requires)](https://pypi.org/project/comtypes/)
24
+ [![PyPI - License](https://img.shields.io/pypi/l/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/comtypes)](https://pypi.org/project/comtypes/)
25
+ [![GitHub Repo stars](https://img.shields.io/github/stars/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/stargazers) [![GitHub forks](https://img.shields.io/github/forks/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/network/members) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
25
26
  [![Tidelift Subscription](https://tidelift.com/badges/package/pypi/comtypes)](https://tidelift.com/subscription/pkg/pypi-comtypes?utm_source=pypi-comtypes&utm_medium=readme)
26
27
 
27
28
 
@@ -30,6 +31,7 @@ License-File: LICENSE.txt
30
31
  `comtypes` allows you to define, call, and implement custom and dispatch-based COM interfaces in pure Python.
31
32
 
32
33
  `comtypes` requires Windows and Python 3.8 or later.
34
+ - Version <= [1.4.7](https://pypi.org/project/comtypes/1.4.7/) does not work with Python 3.13 as reported in [GH-618](https://github.com/enthought/comtypes/issues/618). Version [1.4.8](https://pypi.org/project/comtypes/1.4.8/) can work with Python 3.13.
33
35
  - Version [1.4.6](https://pypi.org/project/comtypes/1.4.6/) is the last version to support Python 3.7.
34
36
  - Version [1.2.1](https://pypi.org/project/comtypes/1.2.1/) is the last version to support Python 2.7 and 3.3–3.6.
35
37
  - `comtypes` does not work with Python 3.8.1 as reported in [GH-202](https://github.com/enthought/comtypes/issues/202). This bug has been fixed in Python >= 3.8.2.
@@ -97,4 +99,4 @@ However, if the script implementation does not use `comtypes.client.GetModule` o
97
99
 
98
100
  ## Documentation
99
101
 
100
- The documentation is currently hosted [here](https://pythonhosted.org/comtypes) on PythonHosted.
102
+ The documentation is currently hosted [here](https://comtypes.readthedocs.io/) on ReadTheDocs.
@@ -8,13 +8,12 @@ setup.py
8
8
  comtypes/GUID.py
9
9
  comtypes/__init__.py
10
10
  comtypes/_comobject.py
11
- comtypes/_idl_stuff.py
12
11
  comtypes/_memberspec.py
13
12
  comtypes/_meta.py
14
13
  comtypes/_npsupport.py
15
- comtypes/_py_instance_method.py
16
14
  comtypes/_safearray.py
17
15
  comtypes/_tlib_version_checker.py
16
+ comtypes/_vtbl.py
18
17
  comtypes/automation.py
19
18
  comtypes/clear_cache.py
20
19
  comtypes/connectionpoints.py
@@ -38,7 +37,9 @@ comtypes.egg-info/dependency_links.txt
38
37
  comtypes.egg-info/entry_points.txt
39
38
  comtypes.egg-info/top_level.txt
40
39
  comtypes/_post_coinit/__init__.py
40
+ comtypes/_post_coinit/_cominterface_meta_patcher.py
41
41
  comtypes/_post_coinit/bstr.py
42
+ comtypes/_post_coinit/instancemethod.py
42
43
  comtypes/_post_coinit/misc.py
43
44
  comtypes/_post_coinit/unknwn.py
44
45
  comtypes/client/__init__.py
@@ -81,6 +82,7 @@ comtypes/test/test_client.py
81
82
  comtypes/test/test_client_dynamic.py
82
83
  comtypes/test/test_client_regenerate_modules.py
83
84
  comtypes/test/test_collections.py
85
+ comtypes/test/test_comobject.py
84
86
  comtypes/test/test_comserver.py
85
87
  comtypes/test/test_createwrappers.py
86
88
  comtypes/test/test_dict.py
@@ -102,12 +104,12 @@ comtypes/test/test_msscript.py
102
104
  comtypes/test/test_npsupport.py
103
105
  comtypes/test/test_outparam.py
104
106
  comtypes/test/test_persist.py
105
- comtypes/test/test_propputref.py
106
107
  comtypes/test/test_pump_events.py
107
108
  comtypes/test/test_recordinfo.py
108
109
  comtypes/test/test_safearray.py
109
110
  comtypes/test/test_sapi.py
110
111
  comtypes/test/test_server.py
112
+ comtypes/test/test_server_register.py
111
113
  comtypes/test/test_shelllink.py
112
114
  comtypes/test/test_showevents.py
113
115
  comtypes/test/test_storage.py
@@ -117,6 +119,7 @@ comtypes/test/test_typeannotator.py
117
119
  comtypes/test/test_typeinfo.py
118
120
  comtypes/test/test_urlhistory.py
119
121
  comtypes/test/test_variant.py
122
+ comtypes/test/test_w_getopt.py
120
123
  comtypes/test/test_win32com_interop.py
121
124
  comtypes/test/test_wmi.py
122
125
  comtypes/test/test_word.py
@@ -0,0 +1,55 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.2"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.ruff.lint]
6
+ ignore = ["E402"]
7
+
8
+ [tool.ruff.lint.per-file-ignores]
9
+ # production
10
+ "comtypes/_comobject.py" = ["E713", "E722", "F401"]
11
+ "comtypes/_npsupport.py" = ["F401"]
12
+ "comtypes/_vtbl.py" = ["E722"]
13
+ "comtypes/connectionpoints.py" = ["F401", "F403", "F405"]
14
+ "comtypes/automation.py" = ["F401", "F403", "F405"]
15
+ "comtypes/errorinfo.py" = ["F403", "F405"]
16
+ "comtypes/git.py" = ["F401", "F403", "F405"]
17
+ "comtypes/logutil.py" = ["E401"]
18
+ "comtypes/shelllink.py" = ["F401"]
19
+ "comtypes/util.py" = ["F403", "F405"]
20
+ "comtypes/viewobject.py" = ["F403", "F405"]
21
+ "comtypes/_post_coinit/unknwn.py" = ["F821"]
22
+ "comtypes/client/__init__.py" = ["F401", "F403"]
23
+ "comtypes/client/_code_cache.py" = ["E401", "E711"]
24
+ "comtypes/client/_constants.py" = ["F401"]
25
+ "comtypes/client/_events.py" = ["F841"]
26
+ "comtypes/client/lazybind.py" = ["F821"]
27
+ "comtypes/server/__init__.py" = ["E401"]
28
+ "comtypes/server/automation.py" = ["F403", "F405"]
29
+ "comtypes/server/connectionpoints.py" = ["F401", "F403", "F405"]
30
+ "comtypes/server/inprocserver.py" = ["E713", "E722", "F403", "F405", "F841"]
31
+ "comtypes/server/localserver.py" = ["F401", "F403", "F405"]
32
+ "comtypes/server/register.py" = ["F403", "F405", "E713", "E731"]
33
+ "comtypes/tools/codegenerator/codegenerator.py" = ["E713", "E721"]
34
+ "comtypes/tools/codegenerator/helpers.py" = ["F401"]
35
+ "comtypes/tools/codegenerator/packing.py" = ["F821", "F841"]
36
+ "comtypes/tools/tlbparser.py" = ["F401"]
37
+ "comtypes/tools/typedesc.py" = ["F403", "F405"]
38
+ "comtypes/tools/typedesc_base.py" = ["F401"]
39
+ # tests
40
+ "comtypes/test/TestComServer.py" = ["E401", "F401", "F403", "F405"]
41
+ "comtypes/test/TestDispServer.py" = ["E401"]
42
+ "comtypes/test/find_memleak.py" = ["E401", "F401", "F403", "F405"]
43
+ "comtypes/test/setup.py" = ["F401"]
44
+ "comtypes/test/test_BSTR.py" = ["E401", "F401", "F403", "F405"]
45
+ "comtypes/test/test_agilent.py" = ["F401", "F841"]
46
+ "comtypes/test/test_client.py" = ["F401"]
47
+ "comtypes/test/test_dict.py" = ["F841"]
48
+ "comtypes/test/test_ie.py" = ["F403", "F405", "F841"]
49
+ "comtypes/test/test_outparam.py" = ["F403", "F405", "F841"]
50
+ "comtypes/test/test_sapi.py" = ["E401"]
51
+ "comtypes/test/test_server.py" = ["E401", "E722", "F401", "F841"]
52
+ "comtypes/test/test_subinterface.py" = ["E401", "F401", "F403", "F405"]
53
+ "comtypes/test/test_typeinfo.py" = ["F401"]
54
+ "comtypes/test/test_urlhistory.py" = ["E401", "F401", "F403", "F405", "F841"]
55
+ "comtypes/test/test_variant.py" = ["F401", "F821", "F841"]