I have some autogenerated protobuf files in my rep...
# general
b
I have some autogenerated protobuf files in my repo. I am using skip_black=True, skip_pylint=True, skip_ruff=True and skip_mypy=True; but for some reason mypy does check the files and I get bunch of errors. Pants however seem to skip black, pylint and ruff as it should. Any ideas why this could be happening?
1
b
If the files are imported from other non-skipped files, Mypy will still examine them (to find definitions and so on): it operates on all files at once, not just individual file-at-a-time like many other linters. (Pants’ offering that flag and seemingly silently ignoring it is very misleading though) To block individual files, you might need to add a commend like
# type: ignore
at the start of them, if you can.
👍 1
b
Thank you. Then I understand why this happens. # type: ignore does the trick.
b
Ah, https://www.pantsbuild.org/docs/python-check-goal#incrementally-adopt-mypy-with-skip_mypytrue offers another solution: setting follow imports to "silent".
👍 1