Open souliane opened 3 months ago
Workaround:
poetry add git+https://github.com/ewjoachim/poetry-to-pre-commit
And use the local repo, e.g.:
- repo: local
hooks:
- id: sync-repos
name: sync-repos
entry: sync-repos
language: system
- id: sync-hooks-additional-dependencies
name: sync-hooks-additional-dependencies
entry: sync-hooks-additional-dependencies
args: [--bind, mypy=main]
language: system
Strange, it's as if pre-commit had pulled the repo but without .git. I wonder why, and why I didn't reproduce this in the repo I manage where I tested this, procrastinate
Hm, I wasn't able to reproduce yet. I tried doing it in a docker so my setup is irrelevant, I tried with either rev: <tag>
or rev: <commit>
, and no reproduction. I tried seeing if the strict parameter would cause this error, but it causes a different one.
I tried older versions of pre-commit and it worked with 1.0.0 (and I can't imagine you'd have an older version than 1.0.0).
I can't find a setting in pre-commit that would impact how the repository is fetched (especially in a way that would end up with the repo not having .git
).
I'll need you to share a bit more on your pre-commit config, your setup (computer vs CI) etc.
I've tried something in #9 but it's just a hunch. Can you try and tell me if it solves it for you ?
I tried and it works with version 2.0.1, but I strangely was not able to reproduce with version 2.0.0 (also after pre-commit clean
). Something was interfering, but I don't know what.
Sorry :-/ Since pre-commit.com is only for git, I think that #9 does not hurt.
Well as long as it works :) Thanks for taking the time to test.
Just FYI, today the issue is here again, also with 2.0.1. We don't know if this is linked to this project or not, so I don't think that it is necessary to re-open.
I'll keep it open in case someone else has the issue too for visibility
This looks great! I tried it by it fails to install:
I don't know how to fix this :-p