Skip to content

pytype hook fails when only test files are updated. #4

Description

@abadger

I have a commit that only updates unit_test files. The pytype hook fails with a usage error:

pytype.......................................................................Failed
- hook id: pytype
- exit code: 2

usage: pytype [options] input [input ...]
pytype: error: Need an input.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions