From 724c9d70d5ae1d23d6121ba2e88fa987af1fd8c5 2022-11-09 16:23:42 From: Jason Grout Date: 2022-11-09 16:23:42 Subject: [PATCH] Fix mypy error by being more explicit and verbose --- diff --git a/IPython/core/magics/basic.py b/IPython/core/magics/basic.py index af69b02..7dfa84c 100644 --- a/IPython/core/magics/basic.py +++ b/IPython/core/magics/basic.py @@ -297,7 +297,10 @@ Currently the magic system has the following functions:""", oname = args and args or '_' info = self.shell._ofind(oname) if info['found']: - txt = (raw and str or pformat)( info['obj'] ) + if raw: + txt = str(info["obj"]) + else: + txt = pformat(info["obj"]) page.page(txt) else: print('Object `%s` not found' % oname)