I’m having a dumb moment… Trying to exclude a test...
# general
c
I’m having a dumb moment… Trying to exclude a tests [source] directory from mypy in pants.toml. What’s wrong with?
[mypy]
args = [“--exclude tests/“]
h
Hi! Not a dumb moment. It's because Pants will still explicitly tell MyPy to run on those files. Instead, you want to use
skip_mypy
field https://www.pantsbuild.org/docs/python-check-goal#incrementally-adopt-mypy-with-skip_mypytrue In 2.14, it gets a little less verbose by letting you add
set_defaults()
to set the value for an entire subtree; before, you unfortunately have to add it to each BUILD file in the relevant folders
❤️ 1
c
Thanks @hundreds-father-404
❤️ 1