-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
error: Error importing plugin "returns.contrib.mypy.returns_plugin": No module named 'returns' [misc] #1577
Comments
Can you try checking |
code/python/test is 📦 v0.1.0 via 🐍 v3.10.6 (test-py3.10) took 4s
λ bat pyproject.toml
───────┬────────────────────────────────────────────────────────────────────────────────────
│ File: pyproject.toml
───────┼────────────────────────────────────────────────────────────────────────────────────
1 │ [tool.poetry]
2 │ name = "test"
3 │ version = "0.1.0"
4 │ description = ""
5 │ authors = ["Sourajyoti Basak <[email protected]>"]
6 │ readme = "README.md"
7 │
8 │ [tool.poetry.dependencies]
9 │ python = "^3.10"
10 │ returns = "^0.19.0"
11 │ mypy = "^0.950"
12 │
13 │ [tool.mypy]
14 │ # plugins = ["returns.contrib.mypy.returns_plugin"]
15 │ allow_redefinition = false
16 │ check_untyped_defs = true
17 │ ignore_errors = false
18 │ ignore_missing_imports = true
19 │ implicit_reexport = false
20 │ local_partial_types = true
21 │ no_implicit_optional = true
22 │ strict_equality = true
23 │ strict_optional = true
24 │ warn_no_return = true
25 │ warn_redundant_casts = true
26 │ warn_unreachable = true
27 │ warn_unused_configs = true
28 │ warn_unused_ignores = true
29 │
30 │ [build-system]
31 │ requires = ["poetry-core"]
32 │ build-backend = "poetry.core.masonry.api"
───────┴────────────────────────────────────────────────────────────────────────────────────
code/python/test is 📦 v0.1.0 via 🐍 v3.10.6 (test-py3.10) took 5s
λ bat test/__init__.py
───────┬────────────────────────────────────────────────────────────────────────────────────
│ File: test/__init__.py
───────┼────────────────────────────────────────────────────────────────────────────────────
1 │ import returns
───────┴────────────────────────────────────────────────────────────────────────────────────
code/python/test is 📦 v0.1.0 via 🐍 v3.10.6 (test-py3.10)
λ mypy test/
Success: no issues found in 1 source file |
Can you run |
code/python/test is 📦 v0.1.0 via 🐍 v3.10.6 (test-py3.10)
λ python3 ./test/__init__.py
code/python/test is 📦 v0.1.0 via 🐍 v3.10.6 (test-py3.10)
λ |
Sorry, I cannot reproduce it :( |
Can you please create a docker image with this problem? |
I have encountered the same error, will be trying to make a minimum example (it has been difficult to do so, though) Setup:
|
Bug report
What's wrong
Mypy is unable to use the plugin. It errors out with the following message:
Here's my
pyproject.toml
:How is that should be
mypy successfully works.
System information
python
version:3.10.6
returns
version:0.19.0
mypy
version:0.950
The text was updated successfully, but these errors were encountered: