stale-rose-15535
06/25/2024, 6:57 PMpants fmt
or pants lint
, but is there a way to use those tools directly without adding them explicitly to my 3rd-party dependencies? I tested adding them to my requirements, using pants export
to get a venv, and then calling them inside of that, but wouldn't that mean two different versions to keep up with? Is there some way to just call whatever version of, say, black is installed when I add black to backend_packages
?wide-midnight-78598
06/25/2024, 7:00 PMstale-rose-15535
06/25/2024, 7:19 PM--resolves
for tools? Or something else?wide-midnight-78598
06/25/2024, 7:32 PMgenerate-lockfiles
puts into a python-default
resolve (for example), and then in the black
or whatever subsystem, you install_from_resolve
requirements
black
fastapi
pants.toml
[python]
enable_resolves = true
interpreter_constraints = ["==3.9.*"]
[python.resolves]
python-default = "build-support/lockfiles/python-default.lock"
[black]
install_from_resolve = "python-default"
pants generate-lockfiles --resolve=python-default
pants fmt ::
pants export --resolve=python-default
source dist/export/python/virtualenvs/python-default/3.9.19/bin/activate
python -c "import black"
stale-rose-15535
06/25/2024, 7:45 PMwide-midnight-78598
06/25/2024, 7:48 PMwide-midnight-78598
06/25/2024, 7:49 PMwide-midnight-78598
06/25/2024, 7:49 PMhappy-kitchen-89482
06/26/2024, 5:19 PMpants fmt
?stale-rose-15535
06/27/2024, 7:57 PMpants fmt
doesn't provide that as an option? Not that I would really expect a general-purpose (and context-dependent) formatting command to do that.happy-kitchen-89482
06/27/2024, 8:07 PMpython -m mylinter
or similar, but use the same version of mylinter that Pants uses?stale-rose-15535
06/27/2024, 8:10 PMstale-rose-15535
06/27/2024, 8:11 PMhappy-kitchen-89482
06/27/2024, 8:14 PMhappy-kitchen-89482
06/27/2024, 8:14 PMhappy-kitchen-89482
06/27/2024, 8:15 PMstale-rose-15535
06/27/2024, 8:22 PMwide-midnight-78598
06/27/2024, 9:51 PM