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

compatibility with black 25.1 #106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
support also older black
MeggyCal committed Mar 10, 2025
commit 897f8991be82f7eacf07f9c413630834a4c47516
5 changes: 4 additions & 1 deletion blue/__init__.py
Original file line number Diff line number Diff line change
@@ -85,6 +85,10 @@ def path_hook(cls):
normalize_string_prefix,
sub_twice,
)
try:
from black.strings import fix_docstring as black_strings_fix_docstring
except ImportError: # black 25.1
from black.strings import fix_multiline_docstring as black_strings_fix_docstring

from flake8.options import config as flake8_config
from flake8.options import manager as flake8_manager
@@ -99,7 +103,6 @@ def path_hook(cls):
LOG = logging.getLogger(__name__)

black_format_file_in_place = black.format_file_in_place
black_strings_fix_docstring = black.strings.fix_multiline_docstring
black_strings_normalize_string_quotes = black.strings.normalize_string_quotes

# Try not to poison Black's cache directory.