Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis-OM JsonModel subclasses BaseModel but does not use type hints in method arguments popup #471

Closed
b-kuch opened this issue Apr 12, 2022 · 0 comments · Fixed by #798
Closed
Labels
enhancement New feature or request

Comments

@b-kuch
Copy link

b-kuch commented Apr 12, 2022

Describe the bug
Redis-OM JsonModel __init__ does not take advantage of type hints even though it subclasses pydantic BaseModel.

To Reproduce
Steps to reproduce the behavior:

  1. pip install redis_om
  2. Create class as on screen.
  3. Check the inspection on __init__.

Expected behavior
Type hints are used in method parameter popup.

Screenshots
Popup uses type hints when it subclasses BaseModel:
image

But doesn't when it subclasses JsonModel:
image

Class hierarchy of JsonModel:
image

Environments (please complete the following information):

  • IDE: PyCharm 2021.3.3
  • OS: Windows10
  • Pydantic Version 1.9.0
  • Plugin version 0.3.12

Additional context
JsonModel implements __init__ so I tried to follow solution shown in #344 but it was to no avail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants