Here is a class that have an async method :
class MyClass():
def __init__(self):
pass
async def makeSomething(self) -> int:
await asyncio.sleep(1)
return 1
And here is somewhere I use it :
async def main():
my_object: MyClass = MyClass()
result = await my_object.makeSomething()
return result
My problem is that, when I ask vscode to tell me what are the type of the variables, I get this :
my_object : has type MyClass
my_object.makeSomething() : has type Coroutine[Any, Any, int]
await my_object.makeSomething() : has type Any
Why do await my_object.makeSomething() is typed as Any and not int?