question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created a year ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
onerandomusernamecommented, Nov 8, 2022

I’m not a maintainer or involved with poetry development, but I agree that files should likely be provided for poetry-lock. I don’t think its intuitive how it currently stands, as it doesn’t make sense to update everything on every commit IMO.

0reactions
amrawadkcommented, Nov 9, 2022

@onerandomusername I understand. Thanks for the feedback never the less 😄 will file a separate bug for this and share it here.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found