Closed
Description
Hi there, I've got a PR that tries to update mypy to the latest version on my project but the tests fail with the following error:
strawberry is in the MYPYPATH. Please remove it.
I'm not sure if there's a way to fix this, I'm not setting the MYPYPATH
anywhere.
Full message:
❯ poetry run pytest -x tests/mypy ─╯
=================================================================================== test session starts ===================================================================================
platform darwin -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
django: settings: tests.django.django_settings (from ini)
rootdir: /Users/patrick/github/strawberry-graphql/strawberry, configfile: pyproject.toml
plugins: snapshot-0.9.0, anyio-3.6.1, benchmark-3.4.1, emoji-0.2.0, mypy-plugins-1.9.3, asyncio-0.19.0, ddtrace-1.2.3, mock-3.8.2, xprocess-0.19.0, django-4.5.2, cov-3.0.0, aiohttp-1.0.4, flask-1.2.0
asyncio: mode=auto
collected 52 items
tests/mypy/test_create_type.yml 😰
======================================================================================== FAILURES =========================================================================================
____________________________________________________________________________________ test_create_type _____________________________________________________________________________________
/Users/patrick/github/strawberry-graphql/strawberry/tests/mypy/test_create_type.yml:12:
E pytest_mypy_plugins.utils.TypecheckAssertionError: Invalid output:
E Actual:
E /Users/patrick/github/strawberry-graphql/strawberry is in the MYPYPATH. Please remove it. (diff)
E ../../../../../../private/var/folders/14/9c602b_16c9773hgk2w8r5cr0000gn/T/pytest-mypy-d5ylfr5y/See https://mypy.readthedocs.io/en/stable/running_mypy.html#how-mypy-handles-imports for more info (diff)
Metadata
Metadata
Assignees
Labels
No labels