-
Notifications
You must be signed in to change notification settings - Fork 0
/
typehints.py
64 lines (59 loc) · 1.9 KB
/
typehints.py
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# typehints.py
"""Type definitions for common type hints"""
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from blpapi import AbstractSession
from blpapi import AuthOptions
from blpapi import ConstantList
from blpapi import CorrelationId
from blpapi import Element
from blpapi import Event
from blpapi import EventDispatcher
from blpapi import EventQueue
from blpapi import Message
from blpapi import Name
from blpapi import Identity
from blpapi import ResolutionList
from blpapi import Request
from blpapi import SchemaElementDefinition
from blpapi import Service
from blpapi import Session
from blpapi import SessionOptions
from blpapi import SubscriptionList
from blpapi import TlsOptions
from blpapi import Topic
from blpapi import TopicList
import datetime
from typing import Union, Any
AnyPythonDatetime = Union[datetime.datetime, datetime.date, datetime.time]
BlpapiNameOrIndex = Union["Name", int]
SupportedElementTypes = Union[
"Name", str, bytes, bool, int, float, AnyPythonDatetime, None
]
# placeholders for opaque handles
BlpapiAbstractSessionHandle = Any
BlpapiAuthOptionsHandle = Any
BlpapiAuthAppHandle = Any
BlpapiAuthTokenHandle = Any
BlpapiAuthUserHandle = Any
BlpapiConstantHandle = Any
BlpapiConstantListHandle = Any
BlpapiDatetime = Union[Any, "blpapi_HighPrecisionDatetime_tag"] # type: ignore
BlpapiElementHandle = Any
BlpapiEventHandle = Any
BlpapiIdentityHandle = Any
BlpapiMessageHandle = Any
BlpapiMessageFormatterHandle = Any
BlpapiMessagePropertiesHandle = Any
BlpapiNameHandle = Any
BlpapiOperationHandle = Any
BlpapiProviderSessionHandle = Any
BlpapiRequestHandle = Any
BlpapiRequestTemplateHandle = Any
BlpapiSchemaHandle = Any
BlpapiSchemaElementDefinitionHandle = Any
BlpapiSchemaTypeDefinitionHandle = Any
BlpapiServiceHandle = Any
BlpapiSessionHandle = Any
BlpapiTlsOptionsHandle = Any
BlpapiTopicHandle = Any