Skip to content

Commit

Permalink
fixing pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wangmot committed Nov 25, 2024
1 parent e06bcb5 commit 57a22a7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/native_libraries/get_emba_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ def parse_cfg_file(content):

parsed_data = parse_cfg_file(file_content)

for key, value in parsed_data.items():
for _, value in parsed_data.items():
filecontent_list = value["filecontent"]

# Remove leading ^ from each string in the filecontent list
for i, content in enumerate(filecontent_list): # Use enumerate to get index and value
if content.startswith("^"):
filecontent_list[i] = content[1:]
for i, pattern in enumerate(filecontent_list): # Use enumerate to get index and value
if pattern.startswith("^"):
filecontent_list[i] = pattern[1:]

if not content.endswith("\\$"):
if content.endswith("$"):
filecontent_list[i] = content[:-1]
if not pattern.endswith("\\$"):
if pattern.endswith("$"):
filecontent_list[i] = pattern[:-1]

os.makedirs(os.path.dirname(json_file_path), exist_ok=True)
with open(json_file_path, "w") as json_file:
Expand Down

0 comments on commit 57a22a7

Please sign in to comment.