Skip to content

Commit 4dd5b1e

Browse files
authored
[Issue #390]added the client._generate._get_known_symbols (#391)
1 parent 9799510 commit 4dd5b1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

comtypes/client/_generate.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from comtypes.tools import codegenerator, tlbparser
1818

1919
if TYPE_CHECKING:
20-
from typing import Any, Tuple, List, Optional, Union as _UnionT
20+
from typing import Any, Tuple, List, Optional, Dict, Union as _UnionT
2121

2222

2323
logger = logging.getLogger(__name__)
@@ -247,8 +247,8 @@ def _create_wrapper_module(tlib, pathname):
247247

248248

249249
def _get_known_symbols():
250-
# type: () -> dict[str, str]
251-
known_symbols = {} # type: dict[str, str]
250+
# type: () -> Dict[str, str]
251+
known_symbols = {} # type: Dict[str, str]
252252
for mod_name in (
253253
"comtypes.persist",
254254
"comtypes.typeinfo",
@@ -259,7 +259,7 @@ def _get_known_symbols():
259259
):
260260
mod = importlib.import_module(mod_name)
261261
if hasattr(mod, "__known_symbols__"):
262-
names = mod.__known_symbols__ # type: list[str]
262+
names = mod.__known_symbols__ # type: List[str]
263263
else:
264264
names = list(mod.__dict__)
265265
for name in names:
@@ -268,6 +268,7 @@ def _get_known_symbols():
268268

269269
################################################################
270270

271+
271272
if __name__ == "__main__":
272273
# When started as script, generate typelib wrapper from .tlb file.
273274
GetModule(sys.argv[1])

0 commit comments

Comments
 (0)