From fcff39144b809d86b207de40e5c0437271e2958e Mon Sep 17 00:00:00 2001 From: nanoric Date: Tue, 21 May 2019 15:25:39 +0800 Subject: [PATCH] [Mod] make flake8 happy --- vnpy/api/itap/generate_error_map.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vnpy/api/itap/generate_error_map.py b/vnpy/api/itap/generate_error_map.py index 59d284c6..7531ce0c 100644 --- a/vnpy/api/itap/generate_error_map.py +++ b/vnpy/api/itap/generate_error_map.py @@ -1,8 +1,9 @@ from typing import Dict -from autocxxpy.core.cxxparser import CxxFileParser import black +from autocxxpy.core.cxxparser import CxxFileParser + parser = CxxFileParser( files=["iTapAPIError.h", "TapAPIError.h", @@ -16,13 +17,9 @@ for v in result.g.variables.values(): for v in result.g.namespaces['ITapTrade'].variables.values(): error_map[v.value] = v.brief_comment - result = f'error_map = {repr(error_map)}' output_file = 'error_codes.py' with open(output_file, "wt", encoding='utf-8') as f: f.write(result) black.main([output_file]) - - -