poetry-plugin-export
poetry-plugin-export copied to clipboard
Pre-commit hook for poetry-export should use same sort strategy as pre-commit/requirements-txt-fixer
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] 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
This plugin sorts its output at https://github.com/python-poetry/poetry-plugin-export/blob/3f27c6b072fc52441499cabbeb381857aa0a080d/src/poetry_plugin_export/exporter.py#L172
So that's the bit to change, if you care about this enough to submit a pull request.