https://pantsbuild.org/ logo
a

ambitious-actor-36781

07/13/2022, 9:33 PM
has anybody noticed isort shuffles stuff around based on what targets you call `lint`/
fmt
on? We've had some issues where our pre-commit hook that uses
--changed-since=HEAD lint
isort will complain about making changes, but then when you manually do
fmt ::
nothing will change
s

sparse-lifeguard-95737

07/13/2022, 9:41 PM
yes, the pants sandboxing can interfere with `isort`’s inference of what’s 1st party and what’s 3rd party (i.e. if the sandbox omits one of your modules,
isort
will think it’s a 3rdparty-dep)
we’ve worked around this using
[tool.isort].known_first_party
in our
pyproject.toml
h

happy-kitchen-89482

07/13/2022, 9:42 PM
And yeah, setting the
known_first_party
in isort config should be a workable bandaid
6 Views