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

Pre-commit hook for poetry-export should use same sort strategy as pre-commit/requirements-txt-fixer #156

Open
2 tasks done
mijdavis2 opened this issue Nov 2, 2022 · 1 comment

Comments

@mijdavis2
Copy link

mijdavis2 commented Nov 2, 2022

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

Pre-commit is excellent for standardizing checks across an organization's repositories. There's a conflict when trying to use poetry-export with pre-commit/requiremenets-txt-fixer as they sort differently.

E.g. the poetry-export hook will put pytest-cov above pytest, while pre-commit/requirements-txt-fixer will do the opposite.

While some may argue to "use one or the other", that makes it difficult to share a standardized .pre-commit-config.yaml across all repos of an org for consistency. Some repos may be currently using poetry or not or are slowing transitioning to use it.

This request is related to python-poetry/poetry#6944

@neersighted neersighted transferred this issue from python-poetry/poetry Nov 2, 2022
@dimbleby
Copy link
Contributor

dimbleby commented Nov 2, 2022

This plugin sorts its output at

content += "\n".join(sorted(dependency_lines))

So that's the bit to change, if you care about this enough to submit a pull request.

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