chore: Add pyproject.toml configuration to ruff format command in Makefile (#4714)

* Add pyproject.toml config flag to ruff commands in Makefile

* Update ruff exclude path in pyproject.toml

* Remove unused TYPE_CHECKING import from api_key.py

* Remove redundant config flag from 'ruff check' command in Makefile
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-11-19 16:06:01 -03:00 committed by GitHub
commit fb83af224a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 6 deletions

View file

@ -181,7 +181,7 @@ fix_codespell: ## run codespell to fix spelling errors
format: ## run code formatters
@uv run ruff check . --fix
@uv run ruff format .
@uv run ruff format . --config pyproject.toml
@cd src/frontend && npm run format
unsafe_fix:

View file

@ -224,7 +224,7 @@ directory = "coverage"
[tool.ruff]
exclude = ["src/backend/langflow/alembic/*"]
exclude = ["src/backend/base/langflow/alembic/*"]
line-length = 120
[tool.ruff.lint]

View file

@ -1,4 +1,3 @@
from typing import TYPE_CHECKING
from uuid import UUID
from fastapi import APIRouter, Depends, HTTPException, Response
@ -12,9 +11,6 @@ from langflow.services.database.models.api_key.crud import create_api_key, delet
from langflow.services.database.models.api_key.model import ApiKeyCreate, UnmaskedApiKeyRead
from langflow.services.deps import get_settings_service
if TYPE_CHECKING:
pass
router = APIRouter(tags=["APIKey"], prefix="/api_key")