4
4
5
5
from ucloud import version
6
6
from ucloud .core .client ._cfg import Config
7
- from ucloud .core .transport import Transport , RequestsTransport , Request , SSLOption
7
+ from ucloud .core .transport import (
8
+ Transport ,
9
+ RequestsTransport ,
10
+ Request ,
11
+ SSLOption ,
12
+ )
8
13
from ucloud .core .typesystem import encoder
9
14
from ucloud .core .utils import log
10
15
from ucloud .core .utils .middleware import Middleware
@@ -80,7 +85,7 @@ def logged_response_handler(self, resp):
80
85
81
86
@staticmethod
82
87
def _parse_dict_config (
83
- config : dict
88
+ config : dict ,
84
89
) -> typing .Tuple [Config , auth .Credential ]:
85
90
return Config .from_dict (config ), auth .Credential .from_dict (config )
86
91
@@ -94,9 +99,15 @@ def _send(self, action: str, args: dict, **options) -> dict:
94
99
timeout = options .get ("timeout" ) or self .config .timeout
95
100
96
101
resp = self .transport .send (
97
- req , ssl_option = SSLOption (self .config .ssl_verify , self .config .ssl_cacert ,
98
- self .config .ssl_cert , self .config .ssl_key ),
99
- timeout = timeout , max_retries = max_retries
102
+ req ,
103
+ ssl_option = SSLOption (
104
+ self .config .ssl_verify ,
105
+ self .config .ssl_cacert ,
106
+ self .config .ssl_cert ,
107
+ self .config .ssl_key ,
108
+ ),
109
+ timeout = timeout ,
110
+ max_retries = max_retries ,
100
111
).json ()
101
112
102
113
for handler in self .middleware .response_handlers :
0 commit comments