redis-om-python icon indicating copy to clipboard operation
redis-om-python copied to clipboard

Provide types in a mypy compatible format

Open rgbkrk opened this issue 2 years ago • 0 comments

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:

  • Contribute types to https://github.com/python/typeshed
  • Provide a py.typed marker

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

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

rgbkrk avatar Apr 25 '23 02:04 rgbkrk