Detect text or binary I/O in pathlib.Path.open()

This commit is contained in:
Andrey Vlasovskikh
2014-01-17 20:52:05 +04:00
parent a8474e6fdc
commit 40dbf8eeff
@@ -37,7 +37,8 @@ import java.util.Set;
* @author yole
*/
public class PyStdlibTypeProvider extends PyTypeProviderBase {
private static final Set<String> OPEN_FUNCTIONS = ImmutableSet.of("__builtin__.open", "io.open", "os.fdopen");
private static final Set<String> OPEN_FUNCTIONS = ImmutableSet.of("__builtin__.open", "io.open", "os.fdopen",
"pathlib.Path.open");
private static final String BINARY_FILE_TYPE = "io.FileIO[bytes]";
private static final String TEXT_FILE_TYPE = "io.TextIOWrapper[unicode]";