black/docs/contributing
Yilei "Dolee" Yang 55db05519e
Fix a crash when # fmt: on is used on a different block level than # fmt: off (#3281)
Previously _Black_ produces invalid code because the `# fmt: on` is used on a different block level.

While _Black_ requires `# fmt: off` and `# fmt: on` to be used at the same block level, incorrect usage shouldn't cause crashes.

The formatting behavior this PR introduces is, the code below the initial `# fmt: off` block level will be turned off for formatting, when `# fmt: on` is used on a different level or there is no `# fmt: on`. This also matches the current behavior when `# fmt: off` is used at the top-level without a matching `# fmt: on`, it turns off formatting for everything below `# fmt: off`.

- Fixes #2567
- Fixes #3184
- Fixes #2985
- Fixes #2882
- Fixes #2232
- Fixes #2140
- Fixes #1817
- Fixes #569
2022-09-23 20:37:22 -07:00
..
reference Fix a crash when # fmt: on is used on a different block level than # fmt: off (#3281) 2022-09-23 20:37:22 -07:00
gauging_changes.md Enforce no formatting changes for PRs via CI (GH-2951) 2022-03-26 17:22:38 -04:00
index.md Convert index.rst and license.rst to markdown (#2852) 2022-03-30 13:43:46 -07:00
issue_triage.md Include Jelle's review suggestions 2021-05-16 18:24:28 +02:00
release_process.md Improve & update release process to reflect recent changes (#3242) 2022-08-31 14:46:48 -07:00
the_basics.md black-primer: stop running it (#2809) 2022-01-26 17:18:43 -08:00