bright-church-87196
04/20/2024, 9:54 AMpants fix :: , it sorts my imports like this:
import aioboto3
import uvicorn
from botocore.config import Config
from fastapi import FastAPI
from fastapi.middleware import Middleware
from fastapi.middleware.cors import CORSMiddleware
from backend.config import get_settings
from backend.routers import router
But when I either run my pre-commit, or directly run pants fix src/python/backend/main.py , it resorts my imports to:
import aioboto3
import uvicorn
from backend.config import get_settings
from backend.routers import router
from botocore.config import Config
from fastapi import FastAPI
from fastapi.middleware import Middleware
from fastapi.middleware.cors import CORSMiddleware
So I keep getting constant reformats and my CI fails because it expects the first sorting, but pre commit overrides it to the second.
(I know I could skip the pre commit, but I wanted to fix this wrong sorting that it is doing)
Any ideas ?broad-processor-92400
04/20/2024, 10:52 AMknown-first-party explicitly.bright-church-87196
04/20/2024, 4:06 PMbright-church-87196
04/22/2024, 6:42 AM[tool.ruff.lint.isort]
known-first-party = ["backend"]
Now pants fix :: and pants fix src/python/backend/main.py are having the same effectbroad-processor-92400
04/22/2024, 6:43 AM