Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions fli/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import plotext as plt
import typer
from click import Context, Parameter
from rich import box
from rich.console import Group
from rich.panel import Panel
Expand All @@ -23,7 +22,9 @@
from 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
Expand All @@ -33,7 +34,7 @@ def validate_currency(ctx: Context, param: Parameter, value: str | None) -> str
return 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
Expand All @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand All @@ -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",
]
Expand Down
5 changes: 5 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.