Skip to content

compatibility with black 25.1 #106

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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
5 changes: 4 additions & 1 deletion blue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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_docstring
black_strings_normalize_string_quotes = black.strings.normalize_string_quotes

# Try not to poison Black's cache directory.
Expand Down