chore: upgrade all Python packages and fix linting issues

- Update all dependencies to latest versions (fastmcp, httpx, packaging, etc.)
- Downgrade click from yanked 8.2.2 to stable 8.1.7
- Fix code formatting and linting issues with ruff
- Most tests passing (2 test failures in dependency resolver need investigation)
This commit is contained in:
Ryan Malloy 2025-08-15 20:23:14 -06:00
parent 503ea589f1
commit 8b43927493
34 changed files with 2276 additions and 1593 deletions

View file

@ -1,6 +1,5 @@
"""Tests for semantic version sorting functionality."""
import pytest
from pypi_query_mcp.core.version_utils import sort_versions_semantically
@ -39,7 +38,7 @@ class TestSemanticVersionSorting:
"""Test development and post-release versions."""
versions = ["1.0.0", "1.0.0.post1", "1.0.0.dev0", "1.0.1"]
result = sort_versions_semantically(versions, reverse=True)
# 1.0.1 should be first, then 1.0.0.post1, then 1.0.0, then 1.0.0.dev0
assert result[0] == "1.0.1"
assert result[1] == "1.0.0.post1"
@ -50,7 +49,7 @@ class TestSemanticVersionSorting:
"""Test that invalid versions fall back to string sorting."""
versions = ["1.0.0", "invalid-version", "another-invalid", "2.0.0"]
result = sort_versions_semantically(versions, reverse=True)
# Valid versions should come first
assert result[0] == "2.0.0"
assert result[1] == "1.0.0"
@ -79,9 +78,9 @@ class TestSemanticVersionSorting:
"""Test sorting with mixed version formats."""
versions = ["1.0", "1.0.0", "1.0.1", "v1.0.2"] # v1.0.2 might be invalid
result = sort_versions_semantically(versions, reverse=True)
# Should handle mixed formats gracefully
assert len(result) == 4
assert "1.0.1" in result
assert "1.0.0" in result
assert "1.0" in result
assert "1.0" in result