-
Notifications
You must be signed in to change notification settings - Fork 12
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
pytype hook fails when only test files are updated. #4
Comments
abadger
added a commit
to abadger/suds
that referenced
this issue
May 31, 2022
The pre-commit pytypes wrapper we're using has a bug. When only unittest files are in the commit, pytype is invoked with no files: mattseymour/pre-commit-pytype#4 Workaround this for now by adding the suds directory to the arguments for pytype. This is a bit to heavyweight to be a good general solution so hopefully the author will find a better way (or I could add a pytpe hook to captain_hooks)
abadger
added a commit
to abadger/suds
that referenced
this issue
May 31, 2022
The pre-commit pytypes wrapper we're using has a bug. When only unittest files are in the commit, pytype is invoked with no files: mattseymour/pre-commit-pytype#4 Workaround this for now by adding the suds directory to the arguments for pytype. This is a bit to heavyweight to be a good general solution so hopefully the author will find a better way (or I could add a pytpe hook to captain_hooks)
abadger
added a commit
to abadger/suds
that referenced
this issue
May 31, 2022
The pre-commit pytypes wrapper we're using has a bug. When only unittest files are in the commit, pytype is invoked with no files: mattseymour/pre-commit-pytype#4 Workaround this for now by adding the suds directory to the arguments for pytype. This is a bit to heavyweight to be a good general solution so hopefully the author will find a better way (or I could add a pytpe hook to captain_hooks)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a commit that only updates unit_test files. The pytype hook fails with a usage error:
I think that pre-commit ci must be invoking pytype because there are .py files in the commit but something is also removing the files from the invocation because they are in a tests/** subdirectory. Maybe the wrapper needs to be slightly heavier weight so that it can check whether there are any files before running pytype.
The text was updated successfully, but these errors were encountered: