pytype icon indicating copy to clipboard operation
pytype copied to clipboard

Skip files ignored by .gitignore

Open dclong opened this issue 4 years ago • 2 comments

Can we add an option to make pytype skip checking files ignored by .gitignore?

dclong avatar Mar 11 '21 18:03 dclong

You can currently tell pytype to skip files in two ways: by adding # pytype: skip-file to the file, or by passing --exclude {file_or_dir} to the pytype run. Does either of these work for your use case?

rchen152 avatar Mar 19 '21 01:03 rchen152

I do know the exclude option and have been leveraging it. However, it kind of duplicated effort to ignore files both in .gitignore and in the setup.cfg file. It doesn't really make sense for pytype to check files ignored by Git. Some other linting tools support ignoring files in .gitignore.

dclong avatar Mar 20 '21 00:03 dclong