From 09f5111eda88ae72a9032d0669f6a36477458475 Mon Sep 17 00:00:00 2001 From: longhao Date: Tue, 27 May 2025 11:52:33 +0800 Subject: [PATCH] fix: resolve import sorting conflicts between ruff and isort - Add isort configuration to pyproject.toml with black profile - Fix import formatting to be compatible with both ruff and isort - All lint checks now pass (both ruff and isort) - Tests continue to pass --- pypi_query_mcp/tools/compatibility_check.py | 7 +------ pypi_query_mcp/tools/package_query.py | 7 +------ pyproject.toml | 6 ++++++ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/pypi_query_mcp/tools/compatibility_check.py b/pypi_query_mcp/tools/compatibility_check.py index 48f4224..20896c7 100644 --- a/pypi_query_mcp/tools/compatibility_check.py +++ b/pypi_query_mcp/tools/compatibility_check.py @@ -3,12 +3,7 @@ import logging from typing import Any -from ..core import ( - InvalidPackageNameError, - NetworkError, - PyPIClient, - PyPIError, -) +from ..core import InvalidPackageNameError, NetworkError, PyPIClient, PyPIError from ..core.version_utils import VersionCompatibility logger = logging.getLogger(__name__) diff --git a/pypi_query_mcp/tools/package_query.py b/pypi_query_mcp/tools/package_query.py index 5cfee49..cf36a0f 100644 --- a/pypi_query_mcp/tools/package_query.py +++ b/pypi_query_mcp/tools/package_query.py @@ -3,12 +3,7 @@ import logging from typing import Any -from ..core import ( - InvalidPackageNameError, - NetworkError, - PyPIClient, - PyPIError, -) +from ..core import InvalidPackageNameError, NetworkError, PyPIClient, PyPIError logger = logging.getLogger(__name__) diff --git a/pyproject.toml b/pyproject.toml index 4f53c22..c12a568 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,12 @@ ignore = [ [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] +[tool.isort] +profile = "black" +multi_line_output = 3 +line_length = 88 +known_first_party = ["pypi_query_mcp"] + [tool.mypy] python_version = "3.10" check_untyped_defs = true