detect-secrets
detect-secrets copied to clipboard
Problem with Python3.11 and pre-commit
- I'm submitting a ...
- [ x] bug report
- [ ] feature request
Currently I have installed pre-commit with pip . If I do an audit it works fine with: Nothing to audit! I added a preconfig configuration like this
- repo: https://github.com/Yelp/detect-secrets
rev: v1.0.1
hooks:
- id: detect-secrets args: ['--baseline', '.secrets.baseline'] exclude: package.lock.json
And it exits always with error code 1 (there is no secret). I tried switching different versions but nothing seems to be working
-
What is the expected behavior?
-
That it works with precommit
-
What is the motivation / use case for changing the behavior? *That it works with pre-commit so that I can add it to my workflow
-
Please tell us about your environment:
- detect-secrets Version: 1.0.1
- Python Version: 3.11
- OS Version: macOs
- File type (if applicable):
@puranss Do you have it working with another version of Python? The title implies the problem is new with Python 11.
Actually no, I edited the title. The problem is, it is working when I use audit but in precommit it fails with exit code 1 but no explaination of it.
I tried it with 3.9, there I have the same problem
Hi @puranss, we just recently released support for Python 3.11. Could you please upgrade detect-secrets to v1.5 and let us know if this issue is still relevant?