rsinger86 / drf-typed

Type hints for enhanced API views and serializers.
https://rsinger86.github.io/drf-typed/
MIT License
80 stars 5 forks source link

Bug: IDE Integration not working #3

Open fernando-freitas-alves opened 1 year ago

fernando-freitas-alves commented 1 year ago

Hey, first of all, I want to say the tool you built is very cool. Congrats! 👏

However, even though I've installed it for a single purpose: type hint sterilizers; it's not working as expected. Aside from what is shown in the documentation (see image below), the instance of my serializer has not IDE integrations.

image

Steps to reproduce

Install:

Create the following:

from rest_typed.serializers import TSerializer

class MessageResponseSerializer(TSerializer):
    message: str | None

Try to interact with the following in the IDE:

message_response = MessageResponseSerializer(data=...)
MessageResponseSerializer.message. # works (not the goal though)
message_response.message. # does not works (see images below)
image image

Am I missing something?