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
This commit is contained in:
longhao 2025-05-27 11:52:33 +08:00 committed by Hal
parent ec677fb709
commit 09f5111eda
3 changed files with 8 additions and 12 deletions

View File

@ -3,12 +3,7 @@
import logging import logging
from typing import Any from typing import Any
from ..core import ( from ..core import InvalidPackageNameError, NetworkError, PyPIClient, PyPIError
InvalidPackageNameError,
NetworkError,
PyPIClient,
PyPIError,
)
from ..core.version_utils import VersionCompatibility from ..core.version_utils import VersionCompatibility
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -3,12 +3,7 @@
import logging import logging
from typing import Any from typing import Any
from ..core import ( from ..core import InvalidPackageNameError, NetworkError, PyPIClient, PyPIError
InvalidPackageNameError,
NetworkError,
PyPIClient,
PyPIError,
)
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -72,6 +72,12 @@ ignore = [
[tool.ruff.lint.per-file-ignores] [tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] "__init__.py" = ["F401"]
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["pypi_query_mcp"]
[tool.mypy] [tool.mypy]
python_version = "3.10" python_version = "3.10"
check_untyped_defs = true check_untyped_defs = true