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

Make isort compatible with black #2495

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Conversation

kubasobon
Copy link
Member

Summary of your changes

I have experienced issues when running black (which we also use as a pre-commit hook) with isort. They sometimes compete with each other, making a commit pass hooks locally, but fail lint action in the Github Actions. Luckily, isort provides a special profile we can use to fix that issue.

Related Issues

Upstream advice on running isort and black together: PyCQA/isort#1518

@kubasobon kubasobon requested a review from a team as a code owner September 10, 2024 15:18
@kubasobon kubasobon self-assigned this Sep 10, 2024
Copy link

mergify bot commented Sep 10, 2024

This pull request does not have a backport label. Could you fix it @kubasobon? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit
    NOTE: backport-v8.x has been added to help with the transition to the new branch 8.x.

@kubasobon kubasobon enabled auto-merge (squash) September 10, 2024 15:22
Copy link
Contributor

@orestisfl orestisfl left a comment

Choose a reason for hiding this comment

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

Weird that it doesn't pick it up from

[tool.isort]
profile = "black"
but why not 🤷

@kubasobon kubasobon merged commit 881b3e7 into elastic:main Sep 10, 2024
11 checks passed
@kubasobon kubasobon deleted the isort-profile branch September 10, 2024 15:39
mergify bot pushed a commit that referenced this pull request Sep 10, 2024
use isort's black profile

(cherry picked from commit 881b3e7)
orestisfl pushed a commit that referenced this pull request Sep 10, 2024
Make isort compatible with black (#2495)

use isort's black profile

(cherry picked from commit 881b3e7)

Co-authored-by: Kuba Soboń <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants