Skip to content
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

Update pre-commit requirement and fix it's branch name #788

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented May 26, 2022

Currently running the pre-commit throws the below error:

[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Restored changes from /root/.cache/pre-commit/patch1653563922.
An unexpected error has occurred: CalledProcessError: command: ('/usr/lib/git-core/git', 'checkout', 'master')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    error: pathspec 'master' did not match any file(s) known to git
    
Check the log at /root/.cache/pre-commit/pre-commit.log

This seems to be because in .pre-commit-config , the branch master is being used as the revision for https://github.com/pre-commit/pre-commit-hooks . Which does not exist (at least anymore).

This change fixes the branch name to main.

It also updates pre-commit PIP requirement to version 2.19.0 which is needed to support black hook.

INFO] Initializing environment for https://github.com/asottile/seed-isort-config.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-isort.
[INFO] Initializing environment for https://github.com/ambv/black.
[ERROR] The hook `black` requires pre-commit version 2.9.2 but version 2.2.0 is installed.  Perhaps run `pip install --upgrade pre-commit`.

@Ashesh3 Ashesh3 requested a review from a team as a code owner May 26, 2022 11:39
Copy link
Member

@vigneshhari vigneshhari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSTM, Untested.

@vigneshhari vigneshhari merged commit 3363229 into coronasafe:master Jun 6, 2022
@Ashesh3 Ashesh3 deleted the fix-precommit branch June 6, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants