This file:
class ModelError(Exception):
"Models can raise this error, which will be displayed to the user"
pass
When run through the latest Black is reformatted to look like this:
class ModelError(Exception):
"Models can raise this error, which will be displayed to the user"
pass
Here's a way to see that happen using uvx. With the previous Black version:
echo 'class ModelError(Exception):
"Models can raise this error, which will be displayed to the user"
pass' | uvx --with 'black==24.10.0' black -
This outputs:
class ModelError(Exception):
"Models can raise this error, which will be displayed to the user"
pass
All done! ✨ 🍰 ✨
1 file left unchanged.
But if you bump to 25.1.0 this happens:
echo 'class ModelError(Exception):
"Models can raise this error, which will be displayed to the user"
pass' | uvx --with 'black==25.1.0' black -
Output:
class ModelError(Exception):
"Models can raise this error, which will be displayed to the user"
pass
reformatted -
All done! ✨ 🍰 ✨
1 file reformatted.
This file:
When run through the latest Black is reformatted to look like this:
Here's a way to see that happen using
uvx. With the previous Black version:This outputs:
But if you bump to
25.1.0this happens:Output: