Skip to content

add pre-commit hook definition#1301

Merged
rchen152 merged 1 commit into
google:mainfrom
ilCatania:main
Oct 12, 2022
Merged

add pre-commit hook definition#1301
rchen152 merged 1 commit into
google:mainfrom
ilCatania:main

Conversation

@ilCatania

Copy link
Copy Markdown
Contributor

Closes #1300. Allows running pytype as a pre-commit hook. The caveat is, pytype still needs to be installed in the virtual environment where the type checks are being performed.

To test this from your python project:

pip install pre-commit pytype
pre-commit try-repo --verbose --all-files https://github.com/ilCatania/pytype.git

and you should get an output similar to this:

[INFO] Initializing environment for https://github.com/ilCatania/pytype.git.
===============================================================================
Using config:
===============================================================================
repos:
-   repo: https://github.com/ilCatania/pytype.git
    rev: 5a1228e8b277c3446c50fdc3767bd5057a886405
    hooks:
    -   id: pytype
===============================================================================
Pytype..................................................................Success
===============================================================================

@google-cla

google-cla Bot commented Oct 11, 2022

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rchen152

Copy link
Copy Markdown
Contributor

Thanks! Looks like the CLA check is failing. Could you take a look at the instructions here: https://github.com/google/pytype/pull/1301/checks?check_run_id=8825270510?

@ilCatania

Copy link
Copy Markdown
Contributor Author

I've done that already, but doesn't seem to be working because my email address is private... I'll try again

@ilCatania

Copy link
Copy Markdown
Contributor Author

I don't know what magically happened but the CLA check went through today @rchen152

@rchen152 rchen152 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@rchen152 rchen152 merged commit b3fb294 into google:main Oct 12, 2022
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.

Add pre-commit support

2 participants