psf/black repo issues and pull requests
When detecting Python versions, `f"{x=}"` should imply 3.8+ #2907 [Zac-HD] T: enhancement S: accepted C: parser C: target version
Describe the bug The = specifier was added to f-strings in Python 3.8, but Black does not yet distinguish it from...
Use debug f-strings for feature detection #3215 [hauntsaninja]
Fixes #2907
add -x : skipping first line like cpython does #3214 [pmp-p] T: enhancement C: parser S: needs discussion
https://docs.python.org/dev/using/cmdline.html#cmdoption-x allows for non standard shebang on dos and web source...
Worse formatting of assert with --preview #3210 [hauntsaninja] T: bug T: design F: linebreak
def foo(): assert ( b"RuntimeError: zasnvkdifnb2rnf cannot be abcdefgh with a " b"bjbkjdf dfsdf...
Better quotes normalisation with triple quotes #3196 [hauntsaninja] T: design F: strings
Is your feature request related to a problem? Please describe. Black's general philosophy is to prefer double...
The blackd daemon doesn't work, it just returns the input source code with line endings stripped #3218 [Hubro] T: bug help wanted
Describe the bug The Black HTTP daemon (blackd) doesn't reformat code, it just prints it right back at me with line...
Use --no-implicit-optional for type checking #3220 [hauntsaninja] skip news
This makes type checking PEP 484 compliant (as of 2018). mypy will change its defaults...
Preview option support for blackd #3195 [Mogost] T: enhancement C: integrations C: configuration S: accepted
It seems that blackd does not support the preview option now. I suggest implementing an option for that like it is...
Fix misdetection of project root with `--stdin-filename` #3216 [hauntsaninja]
There are a number of places this behaviour could be patched, for instance, it's quite tempting to patch it in...
[mypyc] GHA macOS 10.15 is deprecated and is going to be removed by August 30, 2022 #3192 [ichard26] C: packaging C: maintenance
Having ported over the mypyc wheel build workflow to here1, I realized it's using macOS 10.15 for all of the macOS...
Port & upstream mypyc wheel build workflow #3197 [ichard26] skip news C: maintenance
Description This was the last part of #3017. I say was because I rewrote most of the build setup in an effort to...
Remove trailing spaces in f-string expressions #3119 [saroad2]
Description Added a new feature in preview mode: Black now knows how to trim trailing whitespaces inside...
Reduce single file format overhead by lazily importing modules and loading .gitignore / --exclude #3211 [ichard26] C: performance
Description `black.reformat_many` depends on a lot of slow-to-import modules. When formatting simply a single file,...
Strip trailing commas in subscripts with -C #3209 [hauntsaninja] F: trailing comma
Fixes #2296, #3204
Infer target version based on project metadata #3219 [stinodego]
Description Fixes #3124 The logic implemented is as follows: If Black's target_version is specified in the...
Top #3221 [SabinXtha1] T: design
Describe the style change Examples in the current Black style def f(): "Make sure this code is blackened""" ...
feat(#3195): add preview option support for blackd #3217 [Mogost]
Description Resolves #3195 Checklist - did you ... Add a CHANGELOG entry if necessary? Add / update tests if...
Use PEP 621's [project.requires-python] field to automatically set --target-version #3124 [GamePad64] T: enhancement C: configuration S: accepted C: target version
PEP 621 provides project.requires-python field in pyproject.toml. I expect, that most of the tools will support this...
Added depreciated warning in filter warning #3198 [shivamdurgbuns] skip news C: maintenance
Signed-off-by: Shivam Durgbuns shivamdurgbuns@gmail.com fixes: #3176 Description Checklist - did you ... Add a...
isidentical: Looks amazing!
isidentical: Can you also include a couple of normal cases like the ones in here (not all of them, a couple...
isidentical: Is this an expensive function, or is its speed negligible? If it is a bit slow, we could also...
hauntsaninja: It is not too expensive, it's a single loop over the value. mypyc should also compile it well.
isidentical: Cool! Then no need.
github-actions: diff-shades reports zero changes comparing this PR (87e279b) to main (507234c). What is this? |...
ichard26: Man you work fast 👀 Thank you for all of your contributions to Black lately, I really appreciate it :)