From 4b494ae07c3e3ef4ecfdc71fd040ec3705b3c2dd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 29 Jul 2021 12:55:05 +0200 Subject: [PATCH] form improvements --- objects/objects.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/objects/objects.py b/objects/objects.py index e83fb1a..1e5c442 100644 --- a/objects/objects.py +++ b/objects/objects.py @@ -16,8 +16,10 @@ class ObjectDefinitionParser(FileParser): if match: self.mib_table.update({match.group(2): [match.group(1)]}) - def _handle_file_parsing_moving_window(self, file_name: str, current_line: int, moving_window_size: int, - moving_window: list, *args, **kwargs): + def _handle_file_parsing_moving_window( + self, file_name: str, current_line: int, moving_window_size: int, + moving_window: list, *args, **kwargs + ): pass def _post_parsing_operation(self): @@ -35,7 +37,8 @@ def write_translation_file(filename: str, list_of_entries, date_string_full: str outputfile = open(filename, "w") print('ObjectParser: Writing translation file ' + filename) definitions = "" - function = "const char* translateObject(object_id_t object) {\n\tswitch( (object & 0xFFFFFFFF) ) {\n" + function = "const char* translateObject(object_id_t object) " \ + "{\n\tswitch( (object & 0xFFFFFFFF) ) {\n" for entry in list_of_entries: # first part of translate file definitions += f"const char *{entry[1][0]}_STRING = \"{entry[1][0]}\";\n"