longport 3.0.14__cp38-cp38-win_amd64.whl → 3.0.17__cp38-cp38-win_amd64.whl
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.
Potentially problematic release.
This version of longport might be problematic. Click here for more details.
- longport/__init__.py +4 -2
- longport/longport.cp38-win_amd64.pyd +0 -0
- longport/openapi.pyi +27 -1
- {longport-3.0.14.dist-info → longport-3.0.17.dist-info}/METADATA +1 -1
- longport-3.0.17.dist-info/RECORD +8 -0
- {longport-3.0.14.dist-info → longport-3.0.17.dist-info}/WHEEL +1 -1
- longport-3.0.14.dist-info/RECORD +0 -8
longport/__init__.py
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
|
|
3
3
|
from .longport import openapi
|
|
4
|
+
from typing import Optional
|
|
4
5
|
|
|
5
6
|
sys.modules['longport.openapi'] = openapi
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class OpenApiException(Exception):
|
|
9
|
-
def __init__(self, code
|
|
10
|
+
def __init__(self, kind, code, trace_id, message):
|
|
11
|
+
self.kind = kind
|
|
10
12
|
self.code = code
|
|
11
13
|
self.trace_id = trace_id
|
|
12
14
|
self.message = message
|
|
13
15
|
|
|
14
16
|
def __str__(self):
|
|
15
17
|
if self.code != None:
|
|
16
|
-
return "OpenApiException: (code=%d, trace_id=%s) %s" % (self.code, self.trace_id, self.message)
|
|
18
|
+
return "OpenApiException: (kind=%s, code=%d, trace_id=%s) %s" % (self.kind, self.code, self.trace_id, self.message)
|
|
17
19
|
else:
|
|
18
20
|
return "OpenApiException: %s" % self.message
|
|
19
21
|
|
|
Binary file
|
longport/openapi.pyi
CHANGED
|
@@ -3,12 +3,38 @@ from decimal import Decimal
|
|
|
3
3
|
from typing import Any, Callable, List, Optional, Type
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
class ErrorKind:
|
|
7
|
+
"""
|
|
8
|
+
Error kind
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
class Http(ErrorKind):
|
|
12
|
+
"""
|
|
13
|
+
HTTP error
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
class OpenApi(ErrorKind):
|
|
17
|
+
"""
|
|
18
|
+
OpenApi error
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
class Other(ErrorKind):
|
|
22
|
+
"""
|
|
23
|
+
Other error
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
|
|
6
27
|
class OpenApiException(Exception):
|
|
7
28
|
"""
|
|
8
29
|
OpenAPI exception
|
|
9
30
|
"""
|
|
10
31
|
|
|
11
|
-
|
|
32
|
+
kind: ErrorKind
|
|
33
|
+
"""
|
|
34
|
+
Error kind
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
code: int
|
|
12
38
|
"""
|
|
13
39
|
Error code
|
|
14
40
|
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
longport-3.0.17.dist-info/METADATA,sha256=QS4nRcKMDEG8ybBieArlllzZhBTUs-Ldjtt5OWh89zo,3690
|
|
2
|
+
longport-3.0.17.dist-info/WHEEL,sha256=ziY0UvY56ssWH8IFic5cmso2mzCk41mQOi2gg55SWmk,94
|
|
3
|
+
longport/__init__.py,sha256=w0BoFVpP8sPQKKt15KJCIXIE2KP7rL3VNg4ILWGWX7s,641
|
|
4
|
+
longport/longport.cp38-win_amd64.pyd,sha256=p_pOr3qN0gjh0eh2YJrNugeyi91LLEYuWm6IHIYoLo0,9838592
|
|
5
|
+
longport/openapi.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
longport/openapi.pyi,sha256=lojhFak8cJ-Bwc0IC8NznQhsVrb3Bf_sb8VZF-Hh53g,102771
|
|
7
|
+
longport/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
longport-3.0.17.dist-info/RECORD,,
|
longport-3.0.14.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
longport-3.0.14.dist-info/METADATA,sha256=qxW4faZqgo6dS3vkU7sG55rsf5hu-kGepT3G_zAoy08,3690
|
|
2
|
-
longport-3.0.14.dist-info/WHEEL,sha256=l0mXYPwg2acsgD_JrQTc83WKu3f9fKBurlW7zV9fofg,94
|
|
3
|
-
longport/__init__.py,sha256=BxAJnS1cATCeCO6GUO5xAr44U33wW46An9DTqEt579M,575
|
|
4
|
-
longport/longport.cp38-win_amd64.pyd,sha256=hhqWJUUfrQThPjbQCczEpzRREpqer9z6psdvhQo_l54,10050048
|
|
5
|
-
longport/openapi.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
longport/openapi.pyi,sha256=-2crdIUmMtvsYzskloJg4ADiJmUb1FcQC3vgbl_3ymI,102432
|
|
7
|
-
longport/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
longport-3.0.14.dist-info/RECORD,,
|