Fix style issues with latest versions of tools (#39422)

This commit is contained in:
Massimiliano Culpo
2023-08-14 18:38:59 +02:00
committed by GitHub
parent 1fff0241f2
commit 6e31676b29
13 changed files with 21 additions and 27 deletions

View File

@@ -780,7 +780,7 @@ def __enter__(self):
raise RuntimeError("file argument must be set by __init__ ")
# Open both write and reading on logfile
if type(self.logfile) == io.StringIO:
if isinstance(self.logfile, io.StringIO):
self._ioflag = True
# cannot have two streams on tempfile, so we must make our own
sys.stdout = self.logfile