high-egg-2153
02/23/2021, 2:56 PM./pants fmt ::
isort alters "subfolder/app.py" and properly separates my third party imports. If I run:
./pants fmt subfolder::
or ./pants fmt subfolder:lib
isort alters "subfolder/app.py" and puts all my imports back together. Guessing I should see the same behaviour in both cases?
Running pants==2.2.0 and isort==5.7.0hundreds-father-404
02/23/2021, 3:11 PMhigh-egg-2153
02/23/2021, 3:19 PMhundreds-father-404
02/23/2021, 3:24 PMhigh-egg-2153
02/23/2021, 3:39 PMhundreds-father-404
02/23/2021, 3:46 PMhigh-egg-2153
02/23/2021, 3:55 PMhundreds-father-404
02/23/2021, 3:58 PMhigh-egg-2153
02/23/2021, 4:01 PM[isort]
config = "./isort.cfg"
version = "isort>=4.6,<5"
And in isort.cfg I have:
[settings]
known_first_party = ["lib_dash"]
default_section = "THIRDPARTY"
Same resultshundreds-father-404
02/23/2021, 4:52 PMpex -m isort.main isort==5.6.x -o isort.pex
, then ./isort.pex **/*.py
. In that sample repo, solely have the code for subfolder::
. Make sure imports are sorted how you want. Then add in subfolder2
and ensure that all works
That is, this is an isort problem, not a Pants problem, except that Pants surfaces the problem because of the chroot thing. So, the fix is getting isort to play nicelyhigh-egg-2153
02/23/2021, 4:56 PMhundreds-father-404
02/23/2021, 5:00 PM