Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fee5dbb

Browse files
authored
Merge pull request #13464 from adamchainz/revert_auto_black
Revert "enable formatting by default"
2 parents 6d40fd8 + 5ccd62a commit fee5dbb

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

IPython/terminal/interactiveshell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def debugger_cls(self):
200200
).tag(config=True)
201201

202202
autoformatter = Unicode(
203-
"black",
203+
None,
204204
help="Autoformatter to reformat Terminal code. Can be `'black'`, `'yapf'` or `None`",
205205
allow_none=True
206206
).tag(config=True)

docs/source/whatsnew/version8.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,11 @@ For more information please see the following unit test : ``extensions/tests/tes
344344
Auto formatting with black in the CLI
345345
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
346346

347-
If ``black`` is installed in the same environment as IPython, terminal IPython
348-
will now *by default* reformat the code in the CLI when possible. You can
349-
disable this with ``--TerminalInteractiveShell.autoformatter=None``.
350-
351347
This feature was present in 7.x, but disabled by default.
352348

349+
In 8.0, input was automatically reformatted with Black when black was installed.
350+
This feature has been reverted for the time being.
351+
You can re-enable it by setting ``TerminalInteractiveShell.autoformatter`` to ``"black"``
353352

354353
History Range Glob feature
355354
~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)