diff --git a/check.sh b/check.sh index 8912f709e7..a0efa531b6 100755 --- a/check.sh +++ b/check.sh @@ -41,6 +41,8 @@ if git status --porcelain | grep -q "requirements.txt"; then EXIT_STATUS=1 fi +codespell || EXIT_STATUS=$? + python trio/_tests/check_type_completeness.py --overwrite-file || EXIT_STATUS=$? if git status --porcelain trio/_tests/verify_types.json | grep -q "M"; then echo "Type completeness changed, please update!" diff --git a/pyproject.toml b/pyproject.toml index 3b14a075da..264345d8c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,9 @@ [tool.black] target-version = ['py38'] +[tool.codespell] +ignore-words-list = 'astroid,crasher,asend' + [tool.flake8] extend-ignore = ['D', 'E', 'W', 'F403', 'F405', 'F821', 'F822'] per-file-ignores = [ diff --git a/test-requirements.in b/test-requirements.in index 23f128f99a..1911b1bf11 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -18,6 +18,7 @@ flake8 flake8-pyproject astor # code generation pip-tools >= 6.13.0 +codespell # https://github.com/python-trio/trio/pull/654#issuecomment-420518745 mypy-extensions; implementation_name == "cpython" diff --git a/test-requirements.txt b/test-requirements.txt index 939bf7a61e..7e0d86e62e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -28,6 +28,8 @@ click==8.1.5 # via # black # pip-tools +codespell==2.2.5 + # via -r test-requirements.in coverage==7.2.7 # via -r test-requirements.in cryptography==41.0.2 diff --git a/trio/_tests/test_exports.py b/trio/_tests/test_exports.py index 20635b0022..b5d0a44088 100644 --- a/trio/_tests/test_exports.py +++ b/trio/_tests/test_exports.py @@ -175,7 +175,7 @@ def no_underscores(symbols): if modname == "trio": static_names.add("testing") - # these are hidden behind `if sys.plaftorm != "win32" or not TYPE_CHECKING` + # these are hidden behind `if sys.platform != "win32" or not TYPE_CHECKING` # so presumably pyright is parsing that if statement, in which case we don't # care about them being missing. if modname == "trio.socket" and sys.platform == "win32":