Hi,
I am currently adding type annotations to my projects. It seems that trio.open_file and trio.wrap_file returns an instance of the trio._file_io.AsyncIOWrapper. What puts me off a bit is the _file_io part, because names that begin with an underscore are usually meant to be private.
Is trio._file_io.AsyncIOWrapper the correct type annotation to use for the return value of trio.open_file? If so, does it not make sense to expose this type as part of Trio's public API, e.g. trio.AsyncIOWrapper, or perhaps trio.abc.AsyncIOWrapper?
Hi,
I am currently adding type annotations to my projects. It seems that
trio.open_fileandtrio.wrap_filereturns an instance of thetrio._file_io.AsyncIOWrapper. What puts me off a bit is the_file_iopart, because names that begin with an underscore are usually meant to be private.Is
trio._file_io.AsyncIOWrapperthe correct type annotation to use for the return value oftrio.open_file? If so, does it not make sense to expose this type as part of Trio's public API, e.g.trio.AsyncIOWrapper, or perhapstrio.abc.AsyncIOWrapper?