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

handsome-sunset-98068

09/05/2022, 9:43 AM
I am running the fmt goal and observing a discrepancy that fmt is not picking up the target when run on all targets, but works when a precise file is given. %
./pants
fmt
::
... ✓ black made no changes. ✓ docformatter made no changes. ✓ isort made no changes. <--- HERE %
./pants
fmt
projects/appsflyer/appsflyer/apps/appsflyer/views.py
... ✓ black made no changes. ✓ docformatter made no changes. + isort made changes. <--- HERE %
./pants
list
::
... projects/appsflyer/appsflyer/apps/appsflyer/views.py <-- THE TARGET IS PRESENT ...
1
b

bitter-ability-32190

09/05/2022, 11:34 AM
So this is kinda an isort blight exposed through pants. See https://github.com/pantsbuild/pants/issues/15069
TL;DR isort looks around to deduce first party sources. In the first case it's deducing from the other files. If you only give it one it has nothing to go on 🥲 Easiest fix is to configure isort
h

hundreds-father-404

09/06/2022, 5:40 PM
h

handsome-sunset-98068

09/07/2022, 5:14 AM
Yeah, I referred this in the example repo.
5 Views