diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5d37e52..a4baeaf 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index dfe0119..96ab684 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Contextual word checker for better suggestions [![license](https://img.shields.io/github/license/r1j1t/contextualSpellCheck)](https://github.com/R1j1t/contextualSpellCheck/blob/master/LICENSE) [![PyPI](https://img.shields.io/pypi/v/contextualSpellCheck?color=green)](https://pypi.org/project/contextualSpellCheck/) -[![Python-Version](https://img.shields.io/badge/Python-3.6+-green)](https://github.com/R1j1t/contextualSpellCheck#install) +[![Python-Version](https://img.shields.io/badge/Python-3.9+-green)](https://github.com/R1j1t/contextualSpellCheck#install) [![Downloads](https://pepy.tech/badge/contextualspellcheck/week)](https://pepy.tech/project/contextualspellcheck) [![GitHub contributors](https://img.shields.io/github/contributors/r1j1t/contextualSpellCheck)](https://github.com/R1j1t/contextualSpellCheck/graphs/contributors) [![Help Wanted](https://img.shields.io/badge/Help%20Wanted-Task%20List-violet)](https://github.com/R1j1t/contextualSpellCheck#task-list) diff --git a/contextualSpellCheck/contextualSpellCheck.py b/contextualSpellCheck/contextualSpellCheck.py index 62e2a91..1a0ce89 100755 --- a/contextualSpellCheck/contextualSpellCheck.py +++ b/contextualSpellCheck/contextualSpellCheck.py @@ -92,7 +92,9 @@ def __init__( debug_file_path = os.path.join( current_path, "tests", "debugFile.txt" ) - with open(debug_file_path, "w+") as new_file: + with open( + debug_file_path, "w+", encoding="utf8" + ) as new_file: new_file.write("\n".join(words)) print("Final vocab at " + debug_file_path) diff --git a/contextualSpellCheck/tests/test_contextualSpellCheck.py b/contextualSpellCheck/tests/test_contextualSpellCheck.py index aa33306..1280380 100644 --- a/contextualSpellCheck/tests/test_contextualSpellCheck.py +++ b/contextualSpellCheck/tests/test_contextualSpellCheck.py @@ -593,8 +593,8 @@ def test_vocab_file(): ContextualSpellCheck( nlp, "contextualSpellCheck", vocab_path=testVocab, debug=True ) - with open(orgDebugFilePath) as f1: - with open(debugPathFile) as f2: + with open(orgDebugFilePath, encoding="utf8") as f1: + with open(debugPathFile, encoding="utf8") as f2: assert f1.read() == f2.read()