From 956a26b297e5b18d971b3b14dfac5e5519c10690 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sun, 31 Jul 2022 14:18:21 +0800 Subject: [PATCH] =?UTF-8?q?[Mod]=20flake8=E4=BB=A3=E7=A0=81=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy_esunny/api/generator/esunny_md_commen_struct.py | 1 - vnpy_esunny/api/generator/esunny_md_data_struct.py | 1 - vnpy_esunny/api/generator/esunny_td_data_struct.py | 3 --- vnpy_esunny/api/generator/generate_api_functions.py | 10 +++++----- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/vnpy_esunny/api/generator/esunny_md_commen_struct.py b/vnpy_esunny/api/generator/esunny_md_commen_struct.py index fb0218f..acee45e 100644 --- a/vnpy_esunny/api/generator/esunny_md_commen_struct.py +++ b/vnpy_esunny/api/generator/esunny_md_commen_struct.py @@ -28,4 +28,3 @@ "OldPassword": "string", "NewPassword": "string", } - diff --git a/vnpy_esunny/api/generator/esunny_md_data_struct.py b/vnpy_esunny/api/generator/esunny_md_data_struct.py index 87c8f9d..49a9b42 100644 --- a/vnpy_esunny/api/generator/esunny_md_data_struct.py +++ b/vnpy_esunny/api/generator/esunny_md_data_struct.py @@ -97,4 +97,3 @@ "QTotalAskQty": "unsigned long long", "UnderlyContract": "dict", } - diff --git a/vnpy_esunny/api/generator/esunny_td_data_struct.py b/vnpy_esunny/api/generator/esunny_td_data_struct.py index a93dc28..384d9be 100644 --- a/vnpy_esunny/api/generator/esunny_td_data_struct.py +++ b/vnpy_esunny/api/generator/esunny_td_data_struct.py @@ -1278,6 +1278,3 @@ "ManagerConfigFileLen": "int", "ManagerConfigFileText": "char", } - -#} 删除1282行 - diff --git a/vnpy_esunny/api/generator/generate_api_functions.py b/vnpy_esunny/api/generator/generate_api_functions.py index 7a26f74..64030a8 100644 --- a/vnpy_esunny/api/generator/generate_api_functions.py +++ b/vnpy_esunny/api/generator/generate_api_functions.py @@ -93,7 +93,7 @@ def process_line(self, line: str): elif "virtual TAPIINT32 TAP_CDECL Qry" in line: self.process_function(line) elif self.name == "td": - if "virtual void ES_CDECL On" in line: + if "virtual void ES_CDECL On" in line: self.process_callback(line) elif "virtual TAPIINT32 ES_CDECL Qry" in line: self.process_function(line) @@ -277,10 +277,10 @@ def generate_source_task(self): f.write("\t{\n") f.write(f"\t\t{type_} *task_data = new {type_}();\n") f.write(f"\t\t*task_data = *{field};\n") - f.write(f"\t\ttask.task_data = task_data;\n") + f.write("\t\ttask.task_data = task_data;\n") f.write("\t}\n") - f.write(f"\tthis->task_queue.push(task);\n") + f.write("\tthis->task_queue.push(task);\n") f.write("};\n\n") def generate_source_switch(self): @@ -292,7 +292,7 @@ def generate_source_switch(self): f.write(f"case {name.upper()}:\n") f.write("{\n") f.write(f"\tthis->{process_name}(&task);\n") - f.write(f"\tbreak;\n") + f.write("\tbreak;\n") f.write("}\n\n") def generate_source_process(self): @@ -420,7 +420,7 @@ def generate_source_on(self): f.write("\t}\n") f.write("\tcatch (const error_already_set &e)\n") f.write("\t{\n") - f.write(f"\t\tcout << e.what() << endl;\n") + f.write("\t\tcout << e.what() << endl;\n") f.write("\t}\n") f.write("};\n\n")