From c098f4c5df23b1d233ed1b8cea5de67c6cfd6646 2024-06-25 08:25:20 From: M Bussonnier Date: 2024-06-25 08:25:20 Subject: [PATCH] Implement `IPython.utils.io.Tee.isatty` (#14460) A lot of libraries would call `sys.stdout.isatty()`, but `IPython.utils.io.Tee` does not implement `isatty`. Let's add the method to avoid errors. --- diff --git a/IPython/utils/io.py b/IPython/utils/io.py index cef4319..abe3073 100644 --- a/IPython/utils/io.py +++ b/IPython/utils/io.py @@ -75,6 +75,8 @@ class Tee(object): if not self._closed: self.close() + def isatty(self): + return False def ask_yes_no(prompt, default=None, interrupt=None): """Asks a question and returns a boolean (y/n) answer.