Skip to content

docs: use the plugin repo for the poetry-export pre-commit hook - #11213

Merged
Secrus merged 2 commits into
python-poetry:mainfrom
Aryapatel-007:docs/pre-commit-export-hook-repo
Nov 9, 2026
Merged

Secrus merged 2 commits into
python-poetry:mainfrom
Aryapatel-007:docs/pre-commit-export-hook-repo

Conversation

@Aryapatel-007

@Aryapatel-007 Aryapatel-007 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Check List

Resolves: no existing issue that I could find

Both usage examples in docs/pre-commit-hooks.md list poetry-export under repo: https://github.com/python-poetry/poetry, but that repo stopped defining the hook:

  • .pre-commit-hooks.yaml at tag 1.8.3 has poetry-check, poetry-lock, poetry-export and poetry-install.
  • At tag 2.0.0 and on main it has only poetry-check, poetry-lock and poetry-install.
  • poetry-export is now defined in python-poetry/poetry-plugin-export, as the warning in the poetry-export section of this page already says.

So anyone copying these examples with a current rev is asking pre-commit for a hook that repo doesn't provide. This PR moves poetry-export to its own poetry-plugin-export entry in both examples.

I left the FAQ example alone because it pins rev: 1.8.3, where the hook still exists.

  • Added tests for changed code. (N/A: docs only)
  • Updated documentation for changed code.

I ran both versions with pre-commit. With Poetry 2.5.1, the old example fails with [ERROR] `poetry-export` is not present in repository https://github.com/python-poetry/poetry. With poetry-plugin-export 1.10.1, pre-commit finds and runs the hook. In my throwaway project the hook then exited 1 because its poetry.lock was a placeholder, which is unrelated to this change. I didn't build the docs locally.

AI disclosure: this PR was generated by Claude Code (Claude Opus 5.5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@Secrus
Secrus merged commit 841a545 into python-poetry:main Nov 9, 2026
53 checks passed
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.

2 participants