black/docs
Daniel Sparing a066a2bc8b
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 <jelle.zijlstra@gmail.com>
Co-authored-by: Marco Edward Gorelli <marcogorelli@protonmail.com>
2021-11-29 15:07:35 -08:00
..
_static Add EOF and trailing whitespace fixer to pre-commit config (#2330) 2021-06-13 10:22:46 -07:00
compatible_configs fix #1917 (#1918) 2021-01-11 08:21:14 -08:00
contributing Clarify contributing docs (#2398) 2021-07-24 15:59:53 -07:00
guides Change cfg to ini for text highlighting (#2632) 2021-11-21 07:02:08 -08:00
integrations prepare release 2021.11b1 (#2622) 2021-11-17 19:51:49 -08:00
the_black_code_style Fix typos (#2603) 2021-11-11 19:02:43 -08:00
usage_and_configuration prepare release 2021.11b1 (#2622) 2021-11-17 19:51:49 -08:00
authors.md Fix and test docs on Windows (#2262) 2021-05-26 19:04:10 -07:00
change_log.md Fix and test docs on Windows (#2262) 2021-05-26 19:04:10 -07:00
conf.py Fix and test docs on Windows (#2262) 2021-05-26 19:04:10 -07:00
faq.md Return NothingChanged if non-Python cell magic is detected, to avoid tokenize error (#2630) 2021-11-29 15:07:35 -08:00
getting_started.md Jupyter notebook support (#2357) 2021-08-06 16:57:46 -04:00
index.rst Chat on Discord instead of Freenode (#2336) 2021-06-15 10:37:59 -04:00
license.rst Reorganize docs v2 (GH-2174) 2021-05-08 15:17:38 -04:00
make.bat add sphinx docs skeleton (#71) 2018-03-23 14:27:04 -07:00
Makefile Add EOF and trailing whitespace fixer to pre-commit config (#2330) 2021-06-13 10:22:46 -07:00
requirements.txt bump sphinx so it works on Python3.10 (#2546) 2021-10-19 10:52:10 -07:00