diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5092c491..1f610af4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Οδηγός συνεισφοράς στο πρότζεκτ Python-Doc-Gr της κοινότητας PyGreece +# Οδηγός συνεισφοράς στο πρότζεκτ Python-Docs-Gr της κοινότητας PyGreece Eυχαριστούμε πολύ για το ενδιαφέρον σας να συμμετέχετε στη μετάφραση των επίσημων εγγράφων της Python στα Ελληνικά! diff --git a/scripts/check_spelling.py b/scripts/check_spelling.py index 33cd2b2f..ec30e77d 100644 --- a/scripts/check_spelling.py +++ b/scripts/check_spelling.py @@ -34,18 +34,18 @@ def check_spell(po_files=None): ) # Write merged dictionary file - output_filename = tempfile.mktemp(suffix="_merged_dict.txt") - with open(output_filename, "w") as f: - for e in entries: - f.write(f"{e}\n") - - # Run pospell either against all files or the file given on the command line - if not po_files: - po_files = Path(".").glob("*/*.po") - - detected_errors = pospell.spell_check( - po_files, personal_dict=output_filename, language="el_EL" - ) + with tempfile.NamedTemporaryFile(suffix="_merged_dict.txt") as output_filename: + with open(output_filename, "w") as f: + for e in entries: + f.write(f"{e}\n") + + # Run pospell either against all files or the file given on the command line + if not po_files: + po_files = Path(".").glob("*/*.po") + + detected_errors = pospell.spell_check( + po_files, personal_dict=output_filename, language="el_EL" + ) return detected_errors