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

Bug: Isort ignoring pyproject.toml configuration during pre-commit hooks #1890

Closed
Corfucinas opened this issue Jan 28, 2022 · 3 comments
Closed

Comments

@Corfucinas
Copy link

Corfucinas commented Jan 28, 2022

This issue seems similar to #1872

Committing a file with the following pre-commit-hook

  - repo: https://github.com/pycqa/isort
    rev: 5.10.1
    hooks:
      - id: isort

Will run isort while ignoring the configuration on pyproject.toml

[tool.isort]
lines_after_imports = 2

pre-commit will delete the extra line inserted line while running isort <file-name> will add it back

@anirudnits
Copy link
Collaborator

Hello @Corfucinas, Could you please share the repository so I can have a look? One recent issue related to not recognizing config file actually turned out to be due to a syntax-error in the pyproject file, so just wanted to rule that out.

@Corfucinas
Copy link
Author

Hey @anirudnits

I cannot reproduce it, I don't believe it was a typo, but that the pre-commit was not installed with the latest changes. I think you can close this issue now, if I detect it once again, I will reference it by the ticket number including a repo for you to test.

Thanks for the reply! cheers (I'll leave it up to you to close this issue).

@anirudnits
Copy link
Collaborator

@Corfucinas thanks for the update. I'll close the issue now but feel free to re-open this if you find other instances of this problem.

~ Aniruddha

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

No branches or pull requests

2 participants