Replies: 2 comments 6 replies
-
Could you provide a complete, minimal code sample that exhibits the problem? I tried to recreate the problem from your description, but I'm not receiving any error. # pyright: strict
from abc import ABC, abstractmethod
class Base(ABC):
@abstractmethod
async def reap(self, ts: int) -> None:
pass
class Child(Base):
async def reap(self, ts: int) -> None:
pass |
Beta Was this translation helpful? Give feedback.
-
It's been a while but i've just ran into what i think is the same issue running python class Test(ABC):
@abstractmethod
async def test(self) -> AsyncGenerator[bool]:
pass
class TestImpl(Test):
async def test(self) -> AsyncGenerator[bool]:
yield True I've put this in the pyright playground as well: https://pyright-play.net/?code=GYJw9gtgBAhgRgYygSwgBzCALlAggIQGEAaWOAZyxBgSwgFMsALMAEwChRIosBPNZADsA5inSYcucr0EIA4vUH1qWTO3YIANjHLkoAFXqUAFAUIBKAFzsotqAAF4larQbM2NuzplJW9YDxGWMbk9JrA5lAAtAB8eNKyCkoqmADacGBgmgC61nb5UGg65Ooa2roGQQCS6JrGhpRWnrbeslB%2BAVhBIWER0XFSPknKMKog6Zk5eQW2vMhhrAYgAK707EA |
Beta Was this translation helpful? Give feedback.
-
I have an abstract class with the method
the child class implements it as follows
pyright reports the following
what is the proper way to achieve what i'm trying to acheive here? is it to define the child method without async, and have it return Coroutine[Any,Any,None] ?
Beta Was this translation helpful? Give feedback.
All reactions