Skip to content

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

Merged
vigneshhari merged 1 commit into
ohcnetwork:masterfrom
Ashesh3:fix-precommit
Jun 6, 2022
Merged

Update pre-commit requirement and fix it's branch name#788
vigneshhari merged 1 commit into
ohcnetwork:masterfrom
Ashesh3:fix-precommit

Conversation

@Ashesh3
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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 ohcnetwork: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.

2 participants