mirror of
https://github.com/katanemo/plano.git
synced 2026-06-08 14:55:14 +02:00
Update black hook for Python 3.14 (#857)
* Update pre-commit black to latest release * Reformat Python files for new black version
This commit is contained in:
parent
f019f05738
commit
82f34f82f2
13 changed files with 38 additions and 34 deletions
|
|
@ -287,12 +287,16 @@ async def fetch_flights(
|
|||
"flight_number": flight.get("ident_iata") or flight.get("ident"),
|
||||
"departure_time": flight.get("scheduled_out"),
|
||||
"arrival_time": flight.get("scheduled_in"),
|
||||
"origin": flight["origin"].get("code_iata")
|
||||
if isinstance(flight.get("origin"), dict)
|
||||
else None,
|
||||
"destination": flight["destination"].get("code_iata")
|
||||
if isinstance(flight.get("destination"), dict)
|
||||
else None,
|
||||
"origin": (
|
||||
flight["origin"].get("code_iata")
|
||||
if isinstance(flight.get("origin"), dict)
|
||||
else None
|
||||
),
|
||||
"destination": (
|
||||
flight["destination"].get("code_iata")
|
||||
if isinstance(flight.get("destination"), dict)
|
||||
else None
|
||||
),
|
||||
"aircraft_type": flight.get("aircraft_type"),
|
||||
"status": flight.get("status"),
|
||||
"terminal_origin": flight.get("terminal_origin"),
|
||||
|
|
|
|||
|
|
@ -197,12 +197,16 @@ async def fetch_flights(
|
|||
"flight_number": flight.get("ident_iata") or flight.get("ident"),
|
||||
"departure_time": flight.get("scheduled_out"),
|
||||
"arrival_time": flight.get("scheduled_in"),
|
||||
"origin": flight["origin"].get("code_iata")
|
||||
if isinstance(flight.get("origin"), dict)
|
||||
else None,
|
||||
"destination": flight["destination"].get("code_iata")
|
||||
if isinstance(flight.get("destination"), dict)
|
||||
else None,
|
||||
"origin": (
|
||||
flight["origin"].get("code_iata")
|
||||
if isinstance(flight.get("origin"), dict)
|
||||
else None
|
||||
),
|
||||
"destination": (
|
||||
flight["destination"].get("code_iata")
|
||||
if isinstance(flight.get("destination"), dict)
|
||||
else None
|
||||
),
|
||||
"aircraft_type": flight.get("aircraft_type"),
|
||||
"status": flight.get("status"),
|
||||
"terminal_origin": flight.get("terminal_origin"),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExport
|
|||
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
||||
from opentelemetry.sdk.resources import Resource
|
||||
|
||||
|
||||
resource = Resource.create(
|
||||
{
|
||||
"service.name": "weather-forecast-service",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Exposes two endpoints:
|
|||
GET /metrics — Prometheus text format, P95 latency per model (scraped by Prometheus)
|
||||
GET /costs — JSON cost data per model, compatible with cost_metrics source
|
||||
"""
|
||||
|
||||
import json
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import json
|
||||
|
||||
|
||||
ARCH_STATE_HEADER = "x-arch-state"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue