quaint-telephone-89068
03/04/2023, 7:59 PMruff --fix ... command on a file with both a first and third party import (unsorted), the import order is changed as expected. However, when running pants fmt fix lint ::, which also runs ruff, the import order remains unchanged due to wrong distinction between first and third party dependencies. The expected behavior is for ruff to give the same result whether executed directly or through pants.
Pants version
2.16.0.dev7
OS
Only tried this on linux (Ubuntu 22.10).
Additional info
A minimal example that shows the issue, how to reproduce it.
The issue can be mitigated by adding the source root entries in pants.toml to ruff.toml. Something like
src = ["src/python"]
However, having to specify the source roots in two places is not desirable.
pantsbuild/pants