Git Product home page Git Product logo

drf-typed's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

drf-typed's Issues

Difference between this and drf-typed-views

Hi just came across this repo while looking for adding typed functionality to drf (like fastapi) and it looks perfect!

Is this meant to be the successor/reimplementation to your other project drf-typed-views?

And I know this repo is listed as beta, is it currently being used in production anywhere or still pending release.

RecursionError: maximum recursion depth exceeded in comparison

Using List in TSerializer causes an error

File "/Users/l4legenda/.vscode/extensions/ms-python.python-2022.10.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py", line 469, in __call__
    return None if event == 'call' else NO_FTRACE
RecursionError: maximum recursion depth exceeded in comparison

Bug: IDE Integration not working

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.