26.5.0
📦 blackView on GitHub →
✨ 3 features🐛 7 fixes🔧 1 symbols
Summary
This release introduces syntactic support for Python 3.15 features like unpacking in comprehensions and lazy imports, alongside various formatting and error reporting improvements.
Migration Steps
- If you rely on HTTP 500 errors from Blackd for source parse failures, update your error handling as these now return HTTP 400.
✨ New Features
- Add support for unpacking in comprehensions (PEP 798).
- Add support for lazy imports (PEP 810).
- Add syntactic support for Python 3.15.
🐛 Bug Fixes
- Fix # fmt: skip being ignored in nested if expressions with parenthesized in clauses.
- Fix crash when an f-string follows a # fmt: off comment inside brackets.
- Preserve multiline compound statement headers when # fmt: skip is placed on the colon line.
- Fix blank lines being removed between a function and a decorated class in .pyi stub files.
- Prevent string merger from creating unsplittable long lines when a pragma comment (e.g. # type: ignore) follows the closing bracket.
- Improve parse error readability by showing multi-line output with an error pointer.
- Return HTTP 400 (Bad Request) for source parse failures in Blackd instead of HTTP 500.