10000 Add main workflow by thepetk · Pull Request #19 · python/python-docs-el · GitHub
[go: up one dir, main page]

Skip to content

Add main workflow #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 4, 2024
Prev Previous commit
Next Next commit
Update check_spelling
  • Loading branch information
thepetk committed Mar 31, 2024
commit a64bb7ffacdc0c30aea7179097f5b1975e336fb6
11 changes: 6 additions & 5 deletions scripts/check_spelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ def check_spell(po_files=None):
)

# Write merged dictionary file
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")
with tempfile.NamedTemporaryFile(suffix="_merged_dict.txt") as named_tmp_file:
for e in entries:
named_tmp_file.write(f"{e}\n".encode())
named_tmp_file.flush()
named_tmp_file.seek(0)

# 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"
po_files, personal_dict=named_tmp_file.name, language="el_GR"
)
return detected_errors

Expand Down
0