Implementation errors when run with mypy #1525
Unanswered
opossalite
asked this question in
Q&A
Replies: 1 comment
-
I don't know, you probably should check how |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug Description
After providing full type hinting following the guide here, specifically right under the "Mixed Rust/Python project" section, I'm able to see type hinting in vim using pyright. However when I run mypy on the same file, it returns this error:
Your maturin version (
maturin --version
)0.14.13
Your Python version (
python -V
)3.10.9
Your pip version (
pip -V
)23.0.1
What bindings you're using
pyo3
Does
cargo build
work?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/
)?Steps to Reproduce
I am running Arch Linux.
My main.py:
My maturin code is the init code. The project is called "tools", I have a subdirectory called "tools" in the root, and inside is a init.py with this:
and a py.typed empty file, and finally a tools.pyi file for type hinting. This results in perfect type hinting in vim with pyright, however mypy returns the error shown above. Perhaps I've simply missed something or formatted my directories wrong?
Beta Was this translation helpful? Give feedback.
All reactions