diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 0691264..f7bacf4 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -213,14 +213,17 @@ class ExecutionInfo(object): raw_cell = ( (self.raw_cell[:50] + "..") if len(self.raw_cell) > 50 else self.raw_cell ) - return '<%s object at %x, raw_cell="%s" store_history=%s silent=%s shell_futures=%s cell_id=%s>' % ( - name, - id(self), - raw_cell, - self.store_history, - self.silent, - self.shell_futures, - self.cell_id, + return ( + '<%s object at %x, raw_cell="%s" store_history=%s silent=%s shell_futures=%s cell_id=%s>' + % ( + name, + id(self), + raw_cell, + self.store_history, + self.silent, + self.shell_futures, + self.cell_id, + ) ) diff --git a/IPython/testing/plugin/pytest_ipdoctest.py b/IPython/testing/plugin/pytest_ipdoctest.py index 809713d..4ba2f1a 100644 --- a/IPython/testing/plugin/pytest_ipdoctest.py +++ b/IPython/testing/plugin/pytest_ipdoctest.py @@ -782,7 +782,7 @@ def _init_checker_class() -> Type["IPDoctestOutputChecker"]: precision = 0 if fraction is None else len(fraction) if exponent is not None: precision -= int(exponent) - if float(w.group()) == approx(float(g.group()), abs=10 ** -precision): + if float(w.group()) == approx(float(g.group()), abs=10**-precision): # They're close enough. Replace the text we actually # got with the text we want, so that it will match when we # check the string literally. diff --git a/IPython/utils/path.py b/IPython/utils/path.py index 51013c0..a3a417d 100644 --- a/IPython/utils/path.py +++ b/IPython/utils/path.py @@ -85,11 +85,11 @@ def get_py_filename(name): name = os.path.expanduser(name) if os.path.isfile(name): return name - if not name.endswith('.py'): - py_name = name + '.py' + if not name.endswith(".py"): + py_name = name + ".py" if os.path.isfile(py_name): return py_name - raise IOError('File `%r` not found.' % name) + raise IOError("File `%r` not found." % name) def filefind(filename: str, path_dirs=None) -> str: