Skip to content
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

Enable mypy and disable jedi on PyPy #3075

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/trio/_tests/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@
elif tool == "mypy":
if not RUN_SLOW: # pragma: no cover
pytest.skip("use --run-slow to check against mypy")
if sys.implementation.name != "cpython":
pytest.skip("mypy not installed in tests on pypy")

cache = Path.cwd() / ".mypy_cache"

Expand Down Expand Up @@ -266,10 +264,10 @@
if (not symbol.startswith("_")) or symbol.startswith("__")
}

if tool == "mypy":
if sys.implementation.name != "cpython":
pytest.skip("mypy not installed in tests on pypy")
if tool == "jedi" and sys.implementation.name != "cpython":
pytest.skip("jedi does not support pypy")

Check warning on line 268 in src/trio/_tests/test_exports.py

View check run for this annotation

Codecov / codecov/patch

src/trio/_tests/test_exports.py#L268

Added line #L268 was not covered by tests

if tool == "mypy":
cache = Path.cwd() / ".mypy_cache"

_ensure_mypy_cache_updated()
Expand Down
10 changes: 5 additions & 5 deletions test-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ pyright
pyOpenSSL >= 22.0.0 # for the ssl + DTLS tests
trustme # for the ssl + DTLS tests
pylint # for pylint finding all symbols tests
jedi # for jedi code completion tests
jedi; implementation_name == "cpython" # for jedi code completion tests
cryptography>=41.0.0 # cryptography<41 segfaults on pypy3.10

# Tools
black; implementation_name == "cpython"
mypy; implementation_name == "cpython"
types-pyOpenSSL; implementation_name == "cpython" # and annotations
mypy
ruff >= 0.4.3
astor # code generation
uv >= 0.2.24
codespell

# https://github.com/python-trio/trio/pull/654#issuecomment-420518745
mypy-extensions; implementation_name == "cpython"
mypy-extensions
typing-extensions
types-cffi; implementation_name == "cpython"
types-cffi
types-pyOpenSSL
# annotations in doc files
types-docutils
sphinx
Expand Down
14 changes: 7 additions & 7 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ iniconfig==2.0.0
# via pytest
isort==5.13.2
# via pylint
jedi==0.19.1
jedi==0.19.1 ; implementation_name == 'cpython'
# via -r test-requirements.in
jinja2==3.1.4
# via sphinx
markupsafe==2.1.5
# via jinja2
mccabe==0.7.0
# via pylint
mypy==1.11.1 ; implementation_name == 'cpython'
mypy==1.11.1
# via -r test-requirements.in
mypy-extensions==1.0.0 ; implementation_name == 'cpython'
mypy-extensions==1.0.0
# via
# -r test-requirements.in
# black
Expand All @@ -87,7 +87,7 @@ packaging==24.1
# black
# pytest
# sphinx
parso==0.8.4
parso==0.8.4 ; implementation_name == 'cpython'
# via jedi
pathspec==0.12.1 ; implementation_name == 'cpython'
# via black
Expand Down Expand Up @@ -145,15 +145,15 @@ tomlkit==0.13.2
# via pylint
trustme==1.1.0
# via -r test-requirements.in
types-cffi==1.16.0.20240331 ; implementation_name == 'cpython'
types-cffi==1.16.0.20240331
# via
# -r test-requirements.in
# types-pyopenssl
types-docutils==0.21.0.20240724
# via -r test-requirements.in
types-pyopenssl==24.1.0.20240722 ; implementation_name == 'cpython'
types-pyopenssl==24.1.0.20240722
# via -r test-requirements.in
types-setuptools==71.1.0.20240818 ; implementation_name == 'cpython'
types-setuptools==71.1.0.20240818
# via types-cffi
typing-extensions==4.12.2
# via
Expand Down
Loading