Skip to content

Commit 2833cd8

Browse files
authored
add isatty() method in BytesIO (#7243)
1 parent a4a9b29 commit 2833cd8

File tree

1 file changed

+9
-0
lines changed
  • crates/vm/src/stdlib

1 file changed

+9
-0
lines changed

crates/vm/src/stdlib/io.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4768,6 +4768,15 @@ mod _io {
47684768

47694769
Ok(())
47704770
}
4771+
4772+
#[pymethod]
4773+
fn isatty(&self, vm: &VirtualMachine) -> PyResult<bool> {
4774+
if self.closed() {
4775+
return Err(io_closed_error(vm));
4776+
}
4777+
4778+
Ok(false)
4779+
}
47714780
}
47724781

47734782
#[pyclass]

0 commit comments

Comments
 (0)