Google Flights MCP, CLI and Python Library
fix ModuleNotFoundError for click on fresh installs (#222)
Carter Temme21acdc688ed
diff --git a/fli/cli/utils.py b/fli/cli/utils.pyindex 0b0918d..3aac440 100644--- a/fli/cli/utils.py+++ b/fli/cli/utils.py@@ -6,7 +6,6 @@ from typing import Anyimport plotext as pltimport typer-from click import Context, Parameterfrom rich import boxfrom rich.console import Groupfrom rich.panel import Panel@@ -23,7 +22,9 @@ from fli.core.parsers import parse_max_stops as core_parse_max_stopsfrom fli.models import Airline, Airport, MaxStops, TripType-def validate_currency(ctx: Context, param: Parameter, value: str | None) -> str | None:+def validate_currency(+ ctx: typer.Context, param: typer.CallbackParam, value: str | None+) -> str | None:"""Validate currency code format for typer callbacks."""if value is None:return None@@ -33,7 +34,7 @@ def validate_currency(ctx: Context, param: Parameter, value: str | None) -> strreturn normalized-def validate_date(ctx: Context, param: Parameter, value: str) -> str | None:+def validate_date(ctx: typer.Context, param: typer.CallbackParam, value: str) -> str | None:"""Validate date format for typer callbacks."""if value is None:return None@@ -45,7 +46,7 @@ def validate_date(ctx: Context, param: Parameter, value: str) -> str | None:def validate_time_range(- ctx: Context, param: Parameter, value: str | None+ ctx: typer.Context, param: typer.CallbackParam, value: str | None) -> tuple[int, int] | None:"""Validate and parse time range in format 'start-end' (24h format) for typer callbacks."""if not value:diff --git a/pyproject.toml b/pyproject.tomlindex 26d5855..b660118 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -30,6 +30,7 @@ dependencies = ["pydantic>=2.10.4","python-dotenv>=1.0.1","ratelimit>=2.2.1",+ "rich>=13.8.0","tenacity>=9.0.0","typer>=0.15.1",]@@ -38,6 +39,7 @@ dependencies = [mcp = ["fastapi>=0.115.6","fastmcp>=3.2",+ "mcp>=1.2.0","pydantic-settings>=2.0.0","uvicorn>=0.34.0",]diff --git a/uv.lock b/uv.lockindex c7b41f3..f37be10 100644--- a/uv.lock+++ b/uv.lock@@ -647,6 +647,7 @@ dependencies = [{ name = "pydantic" },{ name = "python-dotenv" },{ name = "ratelimit" },+ { name = "rich" },{ name = "tenacity" },{ name = "typer" },]@@ -655,6 +656,7 @@ dependencies = [all = [{ name = "fastapi" },{ name = "fastmcp" },+ { name = "mcp" },{ name = "pydantic-settings" },{ name = "uvicorn" },]@@ -671,6 +673,7 @@ dev = [mcp = [{ name = "fastapi" },{ name = "fastmcp" },+ { name = "mcp" },{ name = "pydantic-settings" },{ name = "uvicorn" },]@@ -683,6 +686,7 @@ requires-dist = [{ name = "fastmcp", marker = "extra == 'mcp'", specifier = ">=3.2" },{ name = "flights", extras = ["mcp"], marker = "extra == 'all'" },{ name = "httpx", specifier = ">=0.28.1" },+ { name = "mcp", marker = "extra == 'mcp'", specifier = ">=1.2.0" },{ name = "mkdocs-material", extras = ["imaging"], marker = "extra == 'dev'", specifier = ">=9.5.49" },{ name = "mkdocstrings", extras = ["python"], marker = "extra == 'dev'", specifier = ">=0.27.0" },{ name = "plotext", specifier = ">=5.3.2" },@@ -694,6 +698,7 @@ requires-dist = [{ name = "pytest-xdist", marker = "extra == 'dev'", specifier = ">=3.6.1" },{ name = "python-dotenv", specifier = ">=1.0.1" },{ name = "ratelimit", specifier = ">=2.2.1" },+ { name = "rich", specifier = ">=13.8.0" },{ name = "ruff", marker = "extra == 'dev'", specifier = ">=0.8.4" },{ name = "tenacity", specifier = ">=9.0.0" },{ name = "twine", marker = "extra == 'dev'", specifier = ">=6.0.0" },