From: Daniel Sparing Date: Mon, 29 Nov 2021 23:07:35 +0000 (-0500) Subject: Return `NothingChanged` if non-Python cell magic is detected, to avoid tokenize error... X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/a066a2bc8b1b7d87b2029f5ebd684582231b0bbc?hp=a066a2bc8b1b7d87b2029f5ebd684582231b0bbc Return `NothingChanged` if non-Python cell magic is detected, to avoid tokenize error (#2630) Fixes https://github.com/psf/black/issues/2627 , a non-Python cell magic such as `%%writeline` can legitimately contain "incorrect" indentation, however this causes `tokenize-rt` to return an error. To avoid this, `validate_cell` should early detect cell magics (just like it detects `TransformerManager` transformations). Test added too, in the shape of a "badly indented" `%%writefile` within `test_non_python_magics`. Co-authored-by: Jelle Zijlstra Co-authored-by: Marco Edward Gorelli ---