Question: are you open to have pre-commit fetch the rev from poetry.lock?
See original GitHub issueHi @asottile !
I’m trying to get pre-commit to fly alongside poetry at work. I’d love to avoid manually keeping the rev
in the .pre-commit-config.yml
file in sync with whatever is in poetry’s poetry.lock
file. I’m thinking instead have pre-commit somehow read the package version from the poetry.lock
file.
I take it this is not possible today (?) and I was wondering if you are open to this idea. If so, I could help see if maybe I can implement that.
Perhaps the rev could be fetched from an arbitrary file (such as poetry.lock
, Pipfile.lock
, requirements.txt
and so on). And using e.g. regex the rev could be extracted from that file and used by pre-commit.
Let me know what you think. Anyway, thanks for all your great work, as always! 😃
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
pre-commit hooks | master | Documentation - Poetry
The poetry-lock hook calls the poetry lock command to make sure the lock file is up-to-date when committing changes. Arguments #. The hook...
Read more >pre-commit
We built pre-commit to solve our hook issues. It is a multi-language package manager for pre-commit hooks. You specify a list of hooks...
Read more >How to have a single source of truth for poetry and pre-commit ...
This hook just keeps in sync the repos rev in .pre-commit-config.yaml with the packages version locked into poetry.lock . If you use:.
Read more >Python with Poetry and pre-commit hooks - Object Partners
Use Poetry and pre-commit hooks to maintain a clean codebase and consistent Python development environment for allmembers of your team.
Read more >User Guide — Hypermodern Python Cookiecutter ...
Install Poetry by downloading and running get-poetry.py: ... When you have answered these questions, your project is generated in the current directory, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
but you can write a hook which does what you want
I am not