[Mod] improve code quality
This commit is contained in:
parent
cf7b89365a
commit
d1df651b40
@ -28,13 +28,7 @@ class StructGenerator:
|
|||||||
self.f_struct = open(f"{self.prefix}_struct.py", "w")
|
self.f_struct = open(f"{self.prefix}_struct.py", "w")
|
||||||
|
|
||||||
for line in self.f_cpp:
|
for line in self.f_cpp:
|
||||||
try:
|
self.process_line(line)
|
||||||
self.process_line(line)
|
|
||||||
except:
|
|
||||||
print("--------------------------")
|
|
||||||
print(line)
|
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
|
||||||
|
|
||||||
self.f_cpp.close()
|
self.f_cpp.close()
|
||||||
self.f_struct.close()
|
self.f_struct.close()
|
||||||
@ -86,5 +80,6 @@ class StructGenerator:
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
generator = StructGenerator("../include/mini/ThostFtdcUserApiStruct.h", "mini")
|
generator = StructGenerator(
|
||||||
|
"../include/mini/ThostFtdcUserApiStruct.h", "mini")
|
||||||
generator.run()
|
generator.run()
|
||||||
|
@ -252,7 +252,7 @@ class BitmexRestApi(RestClient):
|
|||||||
def send_order(self, req: OrderRequest):
|
def send_order(self, req: OrderRequest):
|
||||||
""""""
|
""""""
|
||||||
if not self.check_rate_limit():
|
if not self.check_rate_limit():
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
orderid = str(self.connect_time + self._new_order_id())
|
orderid = str(self.connect_time + self._new_order_id())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user