Support pre-commit hooks even if poetry related files are missing
See original GitHub issue- 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. Other pre-commits use conditionals to SKIP checks if they are unnecessary. Poetry’s pre-commits, however, will fail if pyproject.toml/poetry.lock dont exist in a repo,
Current behavior
pre-commits for poetry fail if poetry related files are missing
Ideal behavior
pre-commits for poetry SKIP gracefully if poetry related files are missing
But why?
So .pre-commit-config.yaml files can be consistent across all repos for an organization.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Git pre-commit hook is not running on Windows - Stack Overflow
Just tried that and now it comes up with an error when I try to commit: "error: cannot spawn .git/hooks/pre-commit: no such file...
Read more >Supported hooks - pre-commit
reorder-python-imports - This hook reorders imports in python files. ... Detect unused or missing CSS classes definitions, and abort if any of the...
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 >Python HOW: Using Poetry, Make, and pre-commit-hooks to ...
We use Poetry to manage the project virtual environment and resolve dependencies. Install Poetry as described here.
Read more >Pre-commit hooks you must know - Towards Data Science
File formatting. Formatting files in a similar way helps readability by improving consistency and keeps git commits clean. For example, you ...
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 Free
Top 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

I’m not a maintainer or involved with poetry development, but I agree that
filesshould likely be provided forpoetry-lock. I don’t think its intuitive how it currently stands, as it doesn’t make sense to update everything on every commit IMO.@onerandomusername I understand. Thanks for the feedback never the less 😄 will file a separate bug for this and share it here.