mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Detect text or binary I/O in pathlib.Path.open()
This commit is contained in:
@@ -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]";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user