python-arango
python-arango copied to clipboard
mypy error: skipping analyzing "arango.database"
Steps to reproduce:
- In an empty directory, create a virtual environment with a method of choice
-
pip install mypy python-arango
-
echo "from arango.database import StandardDatabase" >> temp.py
-
mypy temp.py
- Observe the following:
❯ mypy temp.py
temp.py:1: error: Skipping analyzing "arango.database": module is installed, but missing library stubs or py.typed marker
temp.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)
Workaround
Include the following snippet in a mypy.ini
file (or setup.cfg
/ pyproject.toml
):
[mypy-arango.*]
ignore_missing_imports = True
Permanent Solution Proposal
Consider adding a py.typed
file under arango/
, and update setup.py
accordingly, as suggested here: https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages
Hey @joowani, just wondering if this is something you've come across before and considered?
Hi @aMahanna,
I should be able to add a py.typed
. Thanks for pointing this out.