From 5ccd62a38c58306166898a417e115707e3e673fe 2022-02-25 10:42:04 From: Adam Johnson Date: 2022-02-25 10:42:04 Subject: [PATCH] Revert "enable formatting by default" This reverts PR #13397 / commit df3248f00a60859ed07f81e87531856b30891396, whilst leaving in place the internal improvements. --- diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 3777302..212692a 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -200,7 +200,7 @@ class TerminalInteractiveShell(InteractiveShell): ).tag(config=True) autoformatter = Unicode( - "black", + None, help="Autoformatter to reformat Terminal code. Can be `'black'`, `'yapf'` or `None`", allow_none=True ).tag(config=True) diff --git a/docs/source/whatsnew/version8.rst b/docs/source/whatsnew/version8.rst index 7b2318f..12c5d1f 100644 --- a/docs/source/whatsnew/version8.rst +++ b/docs/source/whatsnew/version8.rst @@ -344,12 +344,11 @@ For more information please see the following unit test : ``extensions/tests/tes Auto formatting with black in the CLI ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If ``black`` is installed in the same environment as IPython, terminal IPython -will now *by default* reformat the code in the CLI when possible. You can -disable this with ``--TerminalInteractiveShell.autoformatter=None``. - This feature was present in 7.x, but disabled by default. +In 8.0, input was automatically reformatted with Black when black was installed. +This feature has been reverted for the time being. +You can re-enable it by setting ``TerminalInteractiveShell.autoformatter`` to ``"black"`` History Range Glob feature ~~~~~~~~~~~~~~~~~~~~~~~~~~