uplink icon indicating copy to clipboard operation
uplink copied to clipboard

"type" Argument not working on "Query" objects

Open LucasEsposito opened this issue 2 years ago • 0 comments

Describe the bug The class "Query" allows the usage of an argument named type since long time ago. On the latest version, it is still allowed. However, that argument is not being used at all. When looking at the code, I notice the value of "type" is still saved, but I can't find any place where it's actually used within the Query class or its parent classes.

To Reproduce Add the following to a client

class Client(Consumer):
    @get("/api/entities")
    def get_entities(self, typed_query: Query(type=lambda x: x + 'something')):
        ...

Then call it

response = client.get_entities(typed_query="holo")
print(response.request.url)

The result: http://mydomain.com/api/entities/?typed_query=holo

Expected behavior The query param value on the url is "holosomething" (instead of just "holo").

Additional context

LucasEsposito avatar Jun 14 '23 14:06 LucasEsposito