fix(ci): clean lint/format and bump hanzo-mcp to 0.12.2

This commit is contained in:
2026-03-04 11:53:51 -08:00
parent 79701d26c4
commit 6c8d3c69b9
9 changed files with 30 additions and 23 deletions
@@ -8,4 +8,10 @@ from .insights_analytics import (
track_tool_usage,
)
__all__ = ["Analytics", "InsightsAnalytics", "track_event", "track_tool_usage", "track_error"]
__all__ = [
"Analytics",
"InsightsAnalytics",
"track_event",
"track_tool_usage",
"track_error",
]
@@ -54,9 +54,8 @@ class InsightsAnalytics:
# Load from environment if not provided (INSIGHTS_API_KEY preferred, POSTHOG_API_KEY fallback)
if not self.config.api_key:
self.config.api_key = (
os.environ.get("INSIGHTS_API_KEY")
or os.environ.get("POSTHOG_API_KEY")
self.config.api_key = os.environ.get("INSIGHTS_API_KEY") or os.environ.get(
"POSTHOG_API_KEY"
)
if not self.config.distinct_id:
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "hanzo-mcp"
version = "0.12.1"
version = "0.12.2"
description = "The Zen of Hanzo MCP: One server to rule them all. The ultimate MCP that orchestrates all others."
readme = "README.md"
requires-python = ">=3.12"
@@ -85,9 +85,7 @@ def test_llm_openai_provider_mocked():
mock_response = MagicMock()
mock_response.choices = [mock_choice]
with patch.object(
llm, "completion", return_value=mock_response
) as mock_completion:
with patch.object(llm, "completion", return_value=mock_response) as mock_completion:
response = llm.completion(
model="openai/gpt-3.5-turbo",
messages=messages,
@@ -116,9 +114,7 @@ def test_llm_anthropic_provider_mocked():
mock_response = MagicMock()
mock_response.choices = [mock_choice]
with patch.object(
llm, "completion", return_value=mock_response
) as mock_completion:
with patch.object(llm, "completion", return_value=mock_response) as mock_completion:
response = llm.completion(
model="anthropic/claude-3-haiku-20240307",
messages=messages,
+1 -1
View File
@@ -12,10 +12,10 @@ from rich.console import Console
from .commands import (
cx,
dns,
fn,
kv,
ml,
dns,
doc,
env,
iam,
+12 -6
View File
@@ -15,22 +15,24 @@ Usage:
from __future__ import annotations
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import Any
from concurrent.futures import ThreadPoolExecutor, as_completed
import click
# Import providers to trigger registration
from . import cloudflare as _cf # noqa: F401
from . import coredns as _cd # noqa: F401
from . import (
coredns as _cd, # noqa: F401
cloudflare as _cf, # noqa: F401
)
from .provider import (
DNSRecord,
DNSZone,
get_active_providers,
DNSRecord,
get_provider,
list_providers as _list_provider_names,
load_dns_config,
require_providers,
get_provider,
get_active_providers,
)
@@ -116,6 +118,7 @@ def dns_group() -> None:
def dns_providers() -> None:
"""Show configured DNS providers and their status."""
from rich.table import Table
from ...utils.output import console
configs = load_dns_config()
@@ -156,6 +159,7 @@ def dns_providers() -> None:
def dns_zones(provider: str | None) -> None:
"""List all DNS zones across all providers."""
from rich.table import Table
from ...utils.output import console
providers = require_providers()
@@ -200,6 +204,7 @@ def dns_zones(provider: str | None) -> None:
def dns_list(zone: str, record_type: str | None, provider: str | None) -> None:
"""List DNS records for a zone (queries all providers in parallel)."""
from rich.table import Table
from ...utils.output import console
providers = require_providers()
@@ -358,6 +363,7 @@ def dns_update(
hanzo dns update hanzo.ai 1.2.3.4 5.6.7.8 -p cloudflare
"""
from rich.table import Table
from ...utils.output import console
providers = require_providers()
@@ -6,7 +6,7 @@ from typing import Any
import click
from .provider import DNSProvider, DNSRecord, DNSZone, register_provider
from .provider import DNSZone, DNSRecord, DNSProvider, register_provider
CF_API = "https://api.cloudflare.com/client/v4"
+1 -1
View File
@@ -10,7 +10,7 @@ from typing import Any
import click
from .provider import DNSProvider, DNSRecord, DNSZone, register_provider
from .provider import DNSZone, DNSRecord, DNSProvider, register_provider
DEFAULT_ENDPOINT = "https://dns.hanzo.ai/api/v1"
+3 -3
View File
@@ -2,12 +2,12 @@
from __future__ import annotations
import json
import sys
import json
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any
from pathlib import Path
from dataclasses import field, dataclass
CREDENTIALS_FILE = Path.home() / ".hanzo" / "credentials.json"