Open Arvind2222 opened 4 years ago
Thanks for the report! I wonder if we're simplifying Coroutine[Any, Any, Any]
to coroutine
(which would be fine for pyi files for pytype's own consumption but wrong for merge-pyi).
Exactly!
previously I submitted a PR for pyi but didn't check for merge-pyi. But it went completely in the wrong direction though
Essentially If I specify the return type, There is something which seems faulty.
The
pyi
generate with thepytype
isAfter running
merge-pyi
for the following it obviously gives a faulty typing for aCoroutine
typesam merge-pyi -i file.py .pytype/pyi/file.pyi
class Response: def init(self, data: str) -> None: self.resp_value = data self.some_value = dict(data)
class Request: def init(self, sem) -> None: self.sem = sem
async def make_get_request(sem="Some arg") -> coroutine: data = await Request(sem).fetch_some_data() return data