redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.12k stars 112 forks source link

misleading type annotation in JsonModel #472

Closed Vioshim closed 1 year ago

Vioshim commented 1 year ago

It's expected to obtain an element that matches the original class, indicating it's a JsonModel makes the type hint ignore the new class it is inheritating currently

marianhlavac commented 1 year ago

I'd suggest maintainers of this repository to not accept this pull request.

Not only it's incomplete (I don't understand why annotation should be removed only on JsonModel and not on HashModel, for example), but also incorrect (this removes the typing and doesn't solve the issue).