high-psychiatrist-4761
06/26/2025, 5:32 PM% pants lint ::
10:28:33.91 [INFO] Completed: Format with Black - black made no changes.
10:28:33.91 [INFO] Completed: Lint with Flake8 - flake8 succeeded.
Partition: ['CPython<4.0,>=3.8']
10:28:33.91 [INFO] Completed: Format with docformatter - docformatter made no changes.
10:28:33.91 [WARN] Completed: Format with Black - black made changes.
src/python/text_streaming_service/text_streaming_service.py
test/python/tests/text_streaming_service/test_text_streaming_service.py
10:28:33.92 [INFO] Completed: Format with isort - isort made no changes.
✕ black failed.
✓ docformatter succeeded.
✓ flake8 succeeded.
✓ isort succeeded.
(One or more formatters failed. Run `pants fmt` to fix.)
Then I run fmt:
% pants fmt ::
10:30:29.58 [WARN] Completed: Format with isort - isort made changes.
src/python/text_streaming_service/text_streaming_service.py
test/python/tests/text_streaming_service/test_text_streaming_service.py
10:30:29.58 [INFO] Completed: Format with docformatter - docformatter made no changes.
10:30:29.58 [WARN] Completed: Format with Black - black made changes.
src/python/text_streaming_service/text_streaming_service.py
test/python/tests/text_streaming_service/test_text_streaming_service.py
10:30:29.58 [INFO] Completed: Format with Black - black made no changes.
+ black made changes.
✓ docformatter made no changes.
+ isort made changes.
Then I ran pants lint ::
again, but it still shows black failed
. do you know why? And what the exact error black report?high-psychiatrist-4761
06/27/2025, 5:54 AMblack
because of this.breezy-twilight-65275
06/27/2025, 6:08 AMcold-summer-59604
06/27/2025, 6:57 AMelegant-florist-94385
06/27/2025, 9:48 AMpants fmt --isort-skip ::
and then git diff
and you should be able to see the changes made by black
(which are getting reverted by `isort`; note your output from fmt
has black
making changes and then isort
making changes after)
Personally, I use isort
with the --profile=black
arg and that cleans up most confusion.high-psychiatrist-4761
06/27/2025, 2:35 PMhigh-psychiatrist-4761
06/27/2025, 7:54 PM--profile=black
workselegant-florist-94385
06/27/2025, 7:55 PM