mirror of
https://github.com/Anime-Game-Servers/Grasscutter-Quests.git
synced 2024-11-23 04:29:42 +00:00
Stop language linter from fighting the main linter on \n
This commit is contained in:
parent
c624479439
commit
2d48fab799
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user