https://pantsbuild.org/ logo
#general
Title
# general
b

bulky-winter-98285

05/07/2019, 9:08 AM
Hi. When using pants with mypy is there a way to tell pants to exclude a folder when running mypy?
r

red-balloon-89377

05/07/2019, 9:08 AM
Hi! What command are you running?
b

bulky-winter-98285

05/07/2019, 9:13 AM
./pants mypy src/some_path::
r

red-balloon-89377

05/07/2019, 9:16 AM
If you want to filter by folder, you can use
--pants-ignore="my/folder"
as an option (
./pants --pants-ignore=... mypy <target>
)
Or, if you want more fine-grained control, you can ignore targets with
--exclude-target-regexp=
in general, if you search for “exclude” in this page https://www.pantsbuild.org/options_reference.html
You’ll get some handy options.
b

bulky-winter-98285

05/07/2019, 9:18 AM
thanks. I will try that out
r

red-balloon-89377

05/07/2019, 9:18 AM
The way I usually go about discovering options is
./pants help-all | grep <approximately what I'm looking for>
, so I’d do
./pants help-all | grep exclude
Cool 🙂 have fun, let us know if you have any issues 🙂
b

bulky-winter-98285

05/07/2019, 9:21 AM
👍