aiofiles icon indicating copy to clipboard operation
aiofiles copied to clipboard

Add type stubs from typeshed

Open nenb opened this issue 4 months ago • 2 comments

~~(WIP, DO NOT MERGE - still waiting for internal review)~~

Ready for review.

Closes #49

nenb avatar Aug 21 '25 22:08 nenb

@Tinche This is almost ready for a final review.

There is just one outstanding error that is arising from the type-checker that I am not certain about and would appreciate your guidance on.

In text.py, readable appears to be defined as both an async and a sync method. The sync method overwrites the async method, and so in practice it is a sync method. (This is my understanding anyway.)

mypy gets a little confused by redefining an async function by a sync function in this way. I can explicitly ignore it, but I first wanted to check with you whether this is deliberate behaviour?

nenb avatar Aug 29 '25 16:08 nenb

Oops, I just saw #28! In which case, this PR is ready for review now.

nenb avatar Aug 29 '25 17:08 nenb