Skip to content

Commit 924a915

Browse files
authored
Merge pull request #1258 from bact/remove-flake8
Remove flake8 from dev dependency
2 parents 1af3d83 + f6762f4 commit 924a915

2 files changed

Lines changed: 15 additions & 17 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ clean-test: ## remove test and coverage artifacts
4646
rm -f .coverage
4747
rm -fr htmlcov/
4848

49-
lint: ## check style with flake8
50-
flake8 pythainlp tests
49+
lint: ## check style
50+
ruff check pythainlp tests notebooks
5151

5252
test: ## run tests quickly with the default Python
5353
python -m unittest discover

pyproject.toml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ dev = [
7474
"build>=1.0.0",
7575
"bump-my-version>=1.2.6",
7676
"coverage>=7.10.7",
77-
"flake8>=7.3.0",
77+
"mypy>=1.19.1",
7878
"ruff>=0.14.14",
7979
"tox>=4.30.3",
8080
]
@@ -345,23 +345,21 @@ select = [
345345
extend-ignore = ["E402", "E501", "E722", "S101", "S202", "S301", "S310"]
346346

347347
[tool.tox]
348-
envlist = ["py39", "py310", "py311", "py312", "py313", "py314", "py3", "pypy3", "flake8"]
348+
env_list = ["py39", "py310", "py311", "py312", "py313", "py314", "pypy310", "pypy311", "ruff"]
349349
skip_missing_interpreters = true
350350

351-
[tool.tox.testenv]
352-
setenv = { PYTHONPATH = "{toxinidir}:{toxinidir}/pythainlp" }
353-
changedir = "tests"
354-
commands = ["discover"]
355-
deps = ["discover"]
351+
[tool.tox.env_run_base]
352+
commands = [["python", "-m", "unittest", "tests.core", "tests.compact"]]
353+
extras = ["compact"]
356354

357-
[tool.tox.envs.pypy3]
355+
[tool.tox.env.pypy310]
358356
basepython = "pypy3.10"
359-
setenv = { PYTHONPATH = "{toxinidir}:{toxinidir}/pythainlp" }
360-
changedir = "tests"
361-
commands = ["discover"]
362-
deps = ["discover"]
363357

364-
[tool.tox.envs.flake8]
358+
[tool.tox.env.pypy311]
359+
basepython = "pypy3.11"
360+
361+
[tool.tox.env.ruff]
365362
basepython = "python"
366-
deps = ["flake8"]
367-
commands = ["flake8 pythainlp"]
363+
deps = ["ruff"]
364+
commands = [["ruff", "check", "pythainlp"], ["ruff", "format", "--check", "pythainlp"]]
365+
skip_install = true

0 commit comments

Comments
 (0)