From e498a4308f88cabc0e2cb264597dea73c91cc49f 2019-11-17 20:14:48 From: Matthias Bussonnier Date: 2019-11-17 20:14:48 Subject: [PATCH] add whats new --- diff --git a/docs/source/whatsnew/pr/autoformatting.rst b/docs/source/whatsnew/pr/autoformatting.rst new file mode 100644 index 0000000..dff810e --- /dev/null +++ b/docs/source/whatsnew/pr/autoformatting.rst @@ -0,0 +1,24 @@ +Code autoformatting +=================== + +The IPython terminal can now auto format your code just before entering a new +line or executing a command. To do so use the +``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; +if black is installed IPython will use black to format your code when possible. + +IPython cannot always properly format your code; in particular it will +auto formatting with *black* will only work if: + + - Your code does not contains magics or special python syntax. + + - There is no code after your cursor. + +The Black API is also still in motion; so this may not work with all versions of +black. + +It should be possible to register custom reformatter, though the API is till in +flux. + + + +