Skip to content

Commit

Permalink
chore: Add pyproject.toml configuration to ruff format command in Mak…
Browse files Browse the repository at this point in the history
…efile (#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
  • Loading branch information
ogabrielluiz authored Nov 19, 2024
1 parent 9e8715c commit fb83af2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 0 additions & 4 deletions src/backend/base/langflow/api/v1/api_key.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import TYPE_CHECKING
from uuid import UUID

from fastapi import APIRouter, Depends, HTTPException, Response
Expand All @@ -12,9 +11,6 @@
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")


Expand Down

0 comments on commit fb83af2

Please sign in to comment.