Stop language linter from fighting the main linter on \n

This commit is contained in:
AnimeGitB 2022-08-10 16:41:19 +09:30 committed by Luke H-W
parent c624479439
commit 2d48fab799

View File

@ -30,6 +30,7 @@ class JsonHelpers:
def save(filename: str, data: dict) -> None: def save(filename: str, data: dict) -> None:
with open(filename, 'w', encoding='utf-8', newline='\n') as file: with open(filename, 'w', encoding='utf-8', newline='\n') as file:
json.dump(data, file, ensure_ascii=False, indent=INDENT) json.dump(data, file, ensure_ascii=False, indent=INDENT)
file.write('\n') # json.dump doesn't terminate last line
@staticmethod @staticmethod
def flatten(data: dict, prefix='') -> dict: def flatten(data: dict, prefix='') -> dict: