From 7f3cd5288d2ba39786727c9a5858588044271602 2024-06-12 17:48:09 From: Yang, Bo Date: 2024-06-12 17:48:09 Subject: [PATCH] Implement `IPython.utils.io.Tee.isatty` 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.