diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 92944d046..7a628b584 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,5 +25,5 @@ jobs: - name: Ruff uses: astral-sh/ruff-action@v3 with: - src: "./pythainlp" + src: "./pythainlp ./tests ./examples" args: check --fix --verbose --line-length 79 --select I,W,C901,W291,W293 diff --git a/docs/conf.py b/docs/conf.py index 250bf5b86..013b87e25 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/examples/khavee.py b/examples/khavee.py index 1a1c0d766..51ba94c53 100644 --- a/examples/khavee.py +++ b/examples/khavee.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/__init__.py b/tests/__init__.py index e325bf4ed..4c06d94bb 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/compact/__init__.py b/tests/compact/__init__.py index 63bba7f50..b5ba439d0 100644 --- a/tests/compact/__init__.py +++ b/tests/compact/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/compact/test_cli.py b/tests/compact/test_cli.py index 38b4c6c70..a0ad0a89b 100644 --- a/tests/compact/test_cli.py +++ b/tests/compact/test_cli.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/compact/testc_parse.py b/tests/compact/testc_parse.py index bd0e45d2c..4860c4ddf 100644 --- a/tests/compact/testc_parse.py +++ b/tests/compact/testc_parse.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/compact/testc_tokenize.py b/tests/compact/testc_tokenize.py index 7da90c232..7818692dd 100644 --- a/tests/compact/testc_tokenize.py +++ b/tests/compact/testc_tokenize.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/compact/testc_tools.py b/tests/compact/testc_tools.py index c9507d14d..c63f69541 100644 --- a/tests/compact/testc_tools.py +++ b/tests/compact/testc_tools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/compact/testc_transliterate.py b/tests/compact/testc_transliterate.py index 5f634b388..3c44128d0 100644 --- a/tests/compact/testc_transliterate.py +++ b/tests/compact/testc_transliterate.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/compact/testc_util.py b/tests/compact/testc_util.py index 1f6d06366..57b67e639 100644 --- a/tests/compact/testc_util.py +++ b/tests/compact/testc_util.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/__init__.py b/tests/core/__init__.py index ea3afeac0..d63788b8d 100644 --- a/tests/core/__init__.py +++ b/tests/core/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_ancient.py b/tests/core/test_ancient.py index 27ba273b3..66bac54cf 100644 --- a/tests/core/test_ancient.py +++ b/tests/core/test_ancient.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_cli.py b/tests/core/test_cli.py index 71730ea71..bdd7572c2 100644 --- a/tests/core/test_cli.py +++ b/tests/core/test_cli.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_corpus.py b/tests/core/test_corpus.py index f541b08ef..e1acc2913 100644 --- a/tests/core/test_corpus.py +++ b/tests/core/test_corpus.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_generate.py b/tests/core/test_generate.py index 8fd9b16b2..03d6f399d 100644 --- a/tests/core/test_generate.py +++ b/tests/core/test_generate.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_khavee.py b/tests/core/test_khavee.py index 97685c817..664c5e585 100644 --- a/tests/core/test_khavee.py +++ b/tests/core/test_khavee.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_lm.py b/tests/core/test_lm.py index 327693694..ec182f187 100644 --- a/tests/core/test_lm.py +++ b/tests/core/test_lm.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_morpheme.py b/tests/core/test_morpheme.py index 4a3e8e2c6..273670c57 100644 --- a/tests/core/test_morpheme.py +++ b/tests/core/test_morpheme.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_soundex.py b/tests/core/test_soundex.py index d290954d6..ec0e948a0 100644 --- a/tests/core/test_soundex.py +++ b/tests/core/test_soundex.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_spell.py b/tests/core/test_spell.py index 7a849e496..89c58f247 100644 --- a/tests/core/test_spell.py +++ b/tests/core/test_spell.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_tag.py b/tests/core/test_tag.py index beb213f23..375bddddb 100644 --- a/tests/core/test_tag.py +++ b/tests/core/test_tag.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_tokenize.py b/tests/core/test_tokenize.py index b1cbb0956..ecbcc3721 100644 --- a/tests/core/test_tokenize.py +++ b/tests/core/test_tokenize.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_tools.py b/tests/core/test_tools.py index b8fac151e..7f71e42dc 100644 --- a/tests/core/test_tools.py +++ b/tests/core/test_tools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_transliterate.py b/tests/core/test_transliterate.py index ec6395622..0585ba757 100644 --- a/tests/core/test_transliterate.py +++ b/tests/core/test_transliterate.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/core/test_util.py b/tests/core/test_util.py index 97f48b437..f9cfc5405 100644 --- a/tests/core/test_util.py +++ b/tests/core/test_util.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/__init__.py b/tests/extra/__init__.py index 4073d5b1c..51e5bf006 100644 --- a/tests/extra/__init__.py +++ b/tests/extra/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_augment.py b/tests/extra/testx_augment.py index e654fdc8b..5276e58e8 100644 --- a/tests/extra/testx_augment.py +++ b/tests/extra/testx_augment.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_benchmarks.py b/tests/extra/testx_benchmarks.py index 354c13328..f6dcd3622 100644 --- a/tests/extra/testx_benchmarks.py +++ b/tests/extra/testx_benchmarks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_classify.py b/tests/extra/testx_classify.py index 313480df3..1d8bd8ff0 100644 --- a/tests/extra/testx_classify.py +++ b/tests/extra/testx_classify.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_cli.py b/tests/extra/testx_cli.py index 730dff76c..7ec46d6bc 100644 --- a/tests/extra/testx_cli.py +++ b/tests/extra/testx_cli.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_coref.py b/tests/extra/testx_coref.py index 749b9a773..a4b1f8b45 100644 --- a/tests/extra/testx_coref.py +++ b/tests/extra/testx_coref.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_corpus.py b/tests/extra/testx_corpus.py index e1c42b846..adac2c622 100644 --- a/tests/extra/testx_corpus.py +++ b/tests/extra/testx_corpus.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_el.py b/tests/extra/testx_el.py index 350d7ad02..aeaf6ba0b 100644 --- a/tests/extra/testx_el.py +++ b/tests/extra/testx_el.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_generate.py b/tests/extra/testx_generate.py index e7a88f82e..31efc08e0 100644 --- a/tests/extra/testx_generate.py +++ b/tests/extra/testx_generate.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_parse.py b/tests/extra/testx_parse.py index f849a1b49..25d3e0351 100644 --- a/tests/extra/testx_parse.py +++ b/tests/extra/testx_parse.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_soundex.py b/tests/extra/testx_soundex.py index 31ae4340c..f5b5d90ec 100644 --- a/tests/extra/testx_soundex.py +++ b/tests/extra/testx_soundex.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_spell.py b/tests/extra/testx_spell.py index ea8f65273..edddac781 100644 --- a/tests/extra/testx_spell.py +++ b/tests/extra/testx_spell.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_summarize.py b/tests/extra/testx_summarize.py index ee2efc4e9..1c766c1a3 100644 --- a/tests/extra/testx_summarize.py +++ b/tests/extra/testx_summarize.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_tag.py b/tests/extra/testx_tag.py index 16ad3e0ae..f5821e826 100644 --- a/tests/extra/testx_tag.py +++ b/tests/extra/testx_tag.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_tokenize.py b/tests/extra/testx_tokenize.py index d2170e0dd..b07f7569c 100644 --- a/tests/extra/testx_tokenize.py +++ b/tests/extra/testx_tokenize.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_translate.py b/tests/extra/testx_translate.py index 8866eca2b..542b8432e 100644 --- a/tests/extra/testx_translate.py +++ b/tests/extra/testx_translate.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_transliterate.py b/tests/extra/testx_transliterate.py index 43683f8ce..9d8da8bc5 100644 --- a/tests/extra/testx_transliterate.py +++ b/tests/extra/testx_transliterate.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_ulmfit.py b/tests/extra/testx_ulmfit.py index e44649114..62fa01854 100644 --- a/tests/extra/testx_ulmfit.py +++ b/tests/extra/testx_ulmfit.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_util.py b/tests/extra/testx_util.py index 9bc2d857e..2d1f84813 100644 --- a/tests/extra/testx_util.py +++ b/tests/extra/testx_util.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_wangchanberta.py b/tests/extra/testx_wangchanberta.py index c03715cd7..69eb00fe5 100644 --- a/tests/extra/testx_wangchanberta.py +++ b/tests/extra/testx_wangchanberta.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_word_vector.py b/tests/extra/testx_word_vector.py index 67fddd7ad..c16c919c1 100644 --- a/tests/extra/testx_word_vector.py +++ b/tests/extra/testx_word_vector.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/extra/testx_wsd.py b/tests/extra/testx_wsd.py index 52e082774..9852c50d2 100644 --- a/tests/extra/testx_wsd.py +++ b/tests/extra/testx_wsd.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0