Closed Mikaela closed 1 year ago
I see very similar errors (full logs below) with Python 3.11 on macOS, and #25 (Python 3.11, Linux) also seems to be related. Some details of the errors differ but the main [Errno 17] File exists
error is equivalent.
In my hands, the installation always succeeds immediately after clearing the pre-commit cache (rm -rf ~/.cache/pre-commit
).
However, after a successful install triggered by git commit
, running pre-commit run
triggers the error. Conversely, after a successful install triggered by pre-commit run
, running git commit
triggers the error.
But after running pre-commit uninstall
followed by pre-commit install
and pre-commit run
, git commit
would no longer trigger a rebuild and would succeed. This is a better workaround/fix than clearing the pre-commit cache (if it works; I did not try this without also clearing the cache).
So it's possible my git hook was installed by an older version of pre-commit (or at least one that somehow causes cache invalidation). At least in my case, it seems that the issue was caused by the version of pre-commit used to install the git hook and the version used to (directly) run being mismatched.
I use several different hooks across several projects and have only encountered this issue with editorconfig-checker.python, so it does seem specific to how this hook builds. Presumably other hooks do not have an issue being rebuilt within the same pre-commit cache repo.
this is a derivative work of shellcheck-py and is currently violating the license by not including a copy of it
it's also missing the fix for this problem -- https://github.com/shellcheck-py/shellcheck-py/pull/91
this is a derivative work of shellcheck-py and is currently violating the license by not including a copy of it
it's also missing the fix for this problem -- shellcheck-py/shellcheck-py#91
Hi @asottile, thanks for the feedbacks.
I will provide the fixes in a temporary branch soon.
Hi @Mikaela, thanks for reporting the issue. I was able to replicate it locally and the fix suggested by @asottile worked fine.
I'd like to wait for editorconfig-checker/pull/292 before creating an official release.
@mmicu it's finally there 🎉 : https://github.com/editorconfig-checker/editorconfig-checker/releases/tag/2.7.2
I am trying to use editorconfig-checker.python with pre-commit on Fedora 39 (beta) and I keep getting the error log (
/home/aminda/.cache/pre-commit/pre-commit.log
) below.Workaround: when I override pre-commit to use Python3.10 or pypy3 as below, everything works.
Using Python 3.11 resulted to the same issue.edit about an hour later: 3.11 seems to work now, maybe I misspelled it earlier in .pre-commit-config.yaml or something.version information
error information