Skip to content

Bug: IDE Integration not working #3

Description

@fernando-freitas-alves

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:

  • VSCode
    • Version: 1.79.1
    • Commit: 4cb974a7aed77a74c7813bdccd99ee0d04901215
    • Date: 2023-06-12T16:16:49.215Z (2 wks ago)
    • Electron: 22.5.7
    • Chromium: 108.0.5359.215
    • Node.js: 16.17.1
    • V8: 10.8.168.25-electron.0
    • OS: Darwin x64 21.6.0
  • Python
    • Version: 3.11.4
    • Mypy: 1.4.1 (compiled: yes)

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions