Skip to content

[Do not merge] Fiddle with the profile to show how black compatibility can be restored#4265

Closed
ale-rt wants to merge 1 commit into
ale/update/pre-commitfrom
ale/update/pre-commit-black-fixed
Closed

[Do not merge] Fiddle with the profile to show how black compatibility can be restored#4265
ale-rt wants to merge 1 commit into
ale/update/pre-commitfrom
ale/update/pre-commit-black-fixed

Conversation

@ale-rt
Copy link
Copy Markdown
Member

@ale-rt ale-rt commented Jan 28, 2026

This is a PR to fix the pre-commit for #4264

@ale-rt ale-rt marked this pull request as draft January 28, 2026 08:08
@ale-rt ale-rt changed the title Fiddle with the profile to show how black compatibility can be restored [Do not merge] Fiddle with the profile to show how black compatibility can be restored Jan 28, 2026
Comment thread pyproject.toml
profile = "plone"
profile = "black"
force_alphabetical_sort = true
force_single_line = true
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to:
https://github.com/PyCQA/isort/blob/024aa37e44c9f29964a4fca355a4680fd4511979/isort/profiles.py#L44-L50

the profile plone is equivalent to:

profile = "black"
force_alphabetical_sort = true
force_single_line = true
lines_after_imports = 2

The last line causes the isort and black pre-commit to clash one with the other.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems caused by this psf/black#4489

@ale-rt
Copy link
Copy Markdown
Member Author

ale-rt commented Jan 28, 2026

Once this is merged we should be good again PyCQA/isort#2457

@ale-rt ale-rt closed this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant