Conversation
Seems like that's not it. |
|
diff-shades results comparing this PR (718ce47) to main (8fe602b). The full diff is available in the logs under the "Generate HTML diff report" step. |
| _Black_ will normalize line endings (`\n` or `\r\n`) based on the first line ending of | ||
| the file. | ||
|
|
||
| ### Form feed characters |
There was a problem hiding this comment.
Moved from "future style", this change is in the 2024 stable style
| # The (future of the) Black code style | ||
|
|
||
| ```{warning} | ||
| Changes to this document often aren't tied and don't relate to releases of |
There was a problem hiding this comment.
This warning isn't really true any more now that we explicitly list preview features.
| _Black_. It's recommended that you read the latest version available. | ||
| ``` | ||
|
|
||
| ## Using backslashes for with statements |
There was a problem hiding this comment.
Moved this to the end as it's a speculative feature that we haven't even implemented. The real-world preview style is more important.
These pass in stable, I think since last year
for more information, see https://pre-commit.ci
|
@hauntsaninja I added a separate I took the opportunity to remove |
There is no "wip.py"
hauntsaninja
left a comment
There was a problem hiding this comment.
Thanks for making this happen!
CHANGES.md
Outdated
|
|
||
| <!-- Changes that affect Black's preview style --> | ||
|
|
||
| - Add `--unstable` style (#4096) |
There was a problem hiding this comment.
Can we add a quick link / blurb here for preview style codebases that want hug_parens?
There was a problem hiding this comment.
I kept the hugging feature (hug_parens_with_braces_and_square_brackets) in preview. Or maybe you're referring to multiline_string_handling?
There was a problem hiding this comment.
Also possibly hug_parens_with_braces_and_square_brackets should go into unstable; I haven't thought much about it beyond not putting it in 2024 stable. We have 11 months left to do that though.
There was a problem hiding this comment.
Ah sorry, I was wrong on the specifics. Just thought more of a mention in changelog could be nice for whatever unstable features users may want
There was a problem hiding this comment.
Good point, I'll add something.
src/black/__init__.py
Outdated
| ) | ||
| @click.option( | ||
| "--enable-unstable-feature", | ||
| type=click.Choice([v.name for v in UNSTABLE_FEATURES]), |
There was a problem hiding this comment.
It could be worth it to be more permissive here, so folks can set --enable-unstable-feature hug_parens and forget about it for a year. But I think that much bother is probably fine for preview...
There was a problem hiding this comment.
I think that's actually fine since we only allow --enable-unstable-feature if you also have --preview, so setting it for a flag that's in preview is a no-op. I'll change this.
In psf#4096 I added a list of current preview/unstable features to the docs. I think this is important for publicizing what's in our preview style. This PR adds an automated test to ensure the list stays up to date in the future.
In #4096 I added a list of current preview/unstable features to the docs. I think this is important for publicizing what's in our preview style. This PR adds an automated test to ensure the list stays up to date in the future.
Closes #4093.
We'd need more discussion before we actually implement that idea, but this also allows me to test whether string processing is responsible for diff-shades crashing all the time.