https://pantsbuild.org/ logo
l

loud-spring-35539

03/22/2023, 8:49 PM
New
pants
user. I've added some new backends after installing and initializing pants. What command do I run to get pants to recognize the new backends?
f

fast-nail-55400

03/22/2023, 8:50 PM
You have added the backends into
pants.toml
? They will be picked up at the next Pants invocation.
l

loud-spring-35539

03/22/2023, 8:51 PM
Copied from the python example repo
Copy code
backend_packages.add = [
  "pants.backend.build_files.fmt.black",  
  "pants.backend.python",
  "pants.backend.python.lint.docformatter",
  "pants.backend.python.lint.black",
  "pants.backend.python.lint.flake8",
  "pants.backend.python.lint.isort",
  "pants.backend.python.typecheck.mypy",
]
running
pants
quietly does nothing
f

fast-nail-55400

03/22/2023, 8:51 PM
Then just continue to use Pants, those backends should be available for whatever goals you use.
Try
pants fmt ::
Or
pants lint ::
, you should pick up the new linter backends
l

loud-spring-35539

03/22/2023, 8:52 PM
With the
mypy
backend I was expecting to have a
typecheck
goal
but that doesn't seem to be present
f

fast-nail-55400

03/22/2023, 8:53 PM
It's the
check
goal
l

loud-spring-35539

03/22/2023, 8:53 PM
ah, that makes sense
w

witty-crayon-22786

03/22/2023, 8:53 PM
would follow the instructions from item 3 in here probably: https://www.pantsbuild.org/docs/initial-configuration .. but yea,
check
l

loud-spring-35539

03/22/2023, 8:54 PM
cheers
2 Views