From 1490feda292d8065c01bb2136be5c30bbf5b23eb Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 9 Oct 2015 19:23:47 +1100 Subject: [PATCH] * Make generate_specials pretty-print the specials.json file --- lang_data/en/generate_specials.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang_data/en/generate_specials.py b/lang_data/en/generate_specials.py index 1a8f1ae0b..6ad503aec 100644 --- a/lang_data/en/generate_specials.py +++ b/lang_data/en/generate_specials.py @@ -1,3 +1,4 @@ +# -#- coding: utf-8 -*- import json contractions = {"n't", "'nt", "not", "'ve", "'d", "'ll", "'s", "'m", "'ma", "'re"} @@ -132,7 +133,6 @@ hardcoded_specials = { "Mt.": [{"F": "Mt.", "L": "Mount"}], "''": [{"F": "''"}], - "Corp.": [{"F": "Corp."}], "Inc.": [{"F": "Inc."}], "Co.": [{"F": "Co."}], @@ -412,6 +412,6 @@ def generate_specials(): if __name__ == "__main__": specials = generate_specials() - with open("specials.json", "w") as f: - json.dump(specials, f) + with open("specials.json", "w") as file_: + file_.write(json.dumps(specials, indent=2))