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]) - - -