redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.07k stars 108 forks source link

Provide types in a mypy compatible format #503

Open rgbkrk opened 1 year ago

rgbkrk commented 1 year ago

When this package is used from a workspace that uses mypy it will show up with the error:

Skipping analyzing "redis_om": module is installed, but missing library stubs or py.typed marker 

More on this from mypy in Missing library stubs or py typed marker

We would love to benefit from type-checking since HashModel is already based on pydantic! Any of the options mypy recommends is great:

I have to put this in my pyproject.toml for the moment:

[[tool.mypy.overrides]]
module = "redis_om"
ignore_missing_imports = true