Skip to content

new type hints i wrote seem to be wrong #162

Closed
@amirreza8002

Description

@amirreza8002

hi
so in the past few commits i have deleted Awaitable from the type hints
the argumnet was that async methods don't return awaitable
which is right

but valkey-py methods aren't async, they are sync methods that could return an awaitable

async def f()  -> int:
    return 2
    
def a() -> Awaitable:
    return f

so having Awaitable in the return types, while annoying, are correct
this problem was pointed out by fix error in python's discord

there is also the suggestion to have different methods for sync and async, or go fully sync
but that's not for me to decide

the question i have is, how would go about reverting the changes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions