Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly loosen the stability policy to permit exceptional (and rare) changes for previously unformatted code #3155

Merged
merged 2 commits into from Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Expand Up @@ -27,6 +27,9 @@
<!-- Major changes to documentation and policies. Small docs changes
don't need a changelog entry. -->

- Reword the stability policy to say that we may, in rare cases, make changes that
affect code that was not previously formatted by _Black_ (#3155)

### Integrations

<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
Expand Down
15 changes: 9 additions & 6 deletions docs/the_black_code_style/index.md
Expand Up @@ -24,13 +24,16 @@ below. Ongoing style considerations are tracked on GitHub with the
The following policy applies for the _Black_ code style, in non pre-release versions of
_Black_:

- The same code, formatted with the same options, will produce the same output for all
releases in a given calendar year.
- If code has been formatted with _Black_, it will remain unchanged when formatted with
the same options using any other release in the same calendar year.

This means projects can safely use `black ~= 22.0` without worrying about major
formatting changes disrupting their project in 2022. We may still fix bugs where
_Black_ crashes on some code, and make other improvements that do not affect
formatting.
This means projects can safely use `black ~= 22.0` without worrying about formatting
changes disrupting their project in 2022. We may still fix bugs where _Black_ crashes
on some code, and make other improvements that do not affect formatting.

In rare cases, we may make changes affecting code that has not been previously
formatted with _Black_. For example, we have had bugs where we accidentally removed
some comments. Such bugs can be fixed without breaking the stability policy.

- The first release in a new calendar year _may_ contain formatting changes, although
these will be minimised as much as possible. This is to allow for improved formatting
Expand Down