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

brash-baker-91190

02/08/2021, 4:37 PM
Pants newbie here 👋 I'm trying to implement Pants on our Python repo and things are going well, but now I've gotten to typechecking. Most of our code is typechecked by mypy, but one library seems to be better handled by pytype. Is anyone aware of a pytype plugin for Pants? Barring that, is there a way that I can configure Pants such that when I run
./pants typecheck ::
I can exclude the library that needs pytype? Thanks.
1
p

polite-garden-50641

02/08/2021, 4:41 PM
you could add tags to a target, this will look something like this:
👍 1
and then when running:
./pants --tag=-nolint <goal> ::
that target will be excluded from the run.
b

brash-baker-91190

02/08/2021, 4:44 PM
ah, nice!
p

polite-garden-50641

02/08/2021, 4:44 PM
AFAIK there is no pytype plugin for pants.
h

hundreds-father-404

02/08/2021, 4:55 PM
Indeed, no pytype plugin, but we'd be happy to help you if you wanted to add one!
b

brash-baker-91190

02/08/2021, 5:00 PM
Appreciated... we're going to see if we can't get our lone library onto mypy, though 😅 In the meantime, I think the tagging approach should work for us.
🤞 1
👍 1
h

happy-kitchen-89482

02/08/2021, 5:10 PM
And to be clear, although it's probably obvious, "nolint" can be an arbitrary string of your choosing.
👍 1
b

brash-baker-91190

02/08/2021, 5:16 PM
👍
4 Views