-
-
Notifications
You must be signed in to change notification settings - Fork 97
/
hints.pyi
26 lines (20 loc) · 821 Bytes
/
hints.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from typing import (
Any, Callable, Generic, NoReturn, Optional, overload, SupportsIndex,
Type, TypeVar, Union as _UnionT,
)
# symbols those what might occur recursive imports in runtime.
from comtypes.automation import IDispatch as IDispatch, VARIANT as VARIANT
from comtypes.server import IClassFactory as IClassFactory
from comtypes.typeinfo import ITypeInfo as ITypeInfo
def AnnoField() -> Any:
"""**THIS IS `TYPE_CHECKING` ONLY SYMBOL.
This is workaround for class field type annotations for old
python versions.
Examples:
# instead of class field annotation, like below
class Foo:
# spam: int # <- not available in old versions.
if TYPE_CHECKING:
spam = AnnoField() # type: int # <- available in old versions.
"""
...