New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: toml with 'black' hook #863
Comments
Huh. So it seems that I had to run autoupdate first. After running autoupdate, the same command runs without error. That was unexpected.
Does that mean that I had a pre-commit environment lying around from another project that was not compatible with 'black@stable'? |
Oh, interesting. When I ran
Do I want to commit that and push it to the other devs? |
If I revert that change and re-run |
I'm not really sure why this would happen with You can see more about the reasoning why it's not recommended to point to a branch at #158 (comment). When you run |
Confirmed - wiping the cache and then running with |
Sorry was away from a computer today :) It's still odd that there was a version installed that mismatched with the dependencies -- I wonder if @chriskuehl's response is spot on too -- there's just a few things I'd add. There's an open issue on black suggesting a change in verbiage around the suggested pre-commit configuration. A few suggestions have been made there but it hasn't really moved forward/backward yet as far as I know. There's also a section in the docs which addresses the mutable refs bits -- of course it's not super helpful until you've known you need to know it (this sentence is a trainwreck but I hope you know what I'm trying to say). Anyway, roundabout blabbering from me 🙃 -- thanks again for this issue -- very detailed and helpful 🎉 |
I have this config:
And I've pip-installed the latest pre-commit 1.12.0 to the Python 3.7.1 environment, but when I run pre-commit, it fails thus:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: