python-arango icon indicating copy to clipboard operation
python-arango copied to clipboard

mypy error: skipping analyzing "arango.database"

Open aMahanna opened this issue 2 years ago • 2 comments

Steps to reproduce:

  1. In an empty directory, create a virtual environment with a method of choice
  2. pip install mypy python-arango
  3. echo "from arango.database import StandardDatabase" >> temp.py
  4. mypy temp.py
  5. 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

aMahanna avatar May 18 '22 14:05 aMahanna

Hey @joowani, just wondering if this is something you've come across before and considered?

aMahanna avatar May 18 '22 14:05 aMahanna

Hi @aMahanna,

I should be able to add a py.typed. Thanks for pointing this out.

joowani avatar May 19 '22 15:05 joowani