https://pantsbuild.org/ logo
n

narrow-activity-17405

08/04/2021, 7:30 AM
I just updated Pants version from 2.5.1 to 2.6.0. When I run
./pants fmt ::
, it tells me that it reformatted one file. When I run
./pants lint ::
it tells me that the file needs to be reformatted 🙂 What could be wrong?
h

hundreds-father-404

08/04/2021, 7:36 AM
Hm, which auto formatter is this? One idea is if you have two auto formatters or linters that conflict with each other - for example, fixing Black means breaking isort
n

narrow-activity-17405

08/04/2021, 7:48 AM
Black was failing. The thing is that
fmt
did no change to the code. When I installed black and used it outside of Pants, it actually modified the file. It turned out to be that one docstring started with four
"
.
h

hundreds-father-404

08/04/2021, 7:51 AM
Hmm, is the version of black different maybe? I think it was bumped in 2.6. You can run ./pants help-advanced black
n

narrow-activity-17405

08/04/2021, 8:05 AM
Yeah, probably. Anyway, I pinned the black version in pants.toml, so I can change it on my own when needed. Thank you.
👍 1
4 Views