Build Pigway Frame Flow with bilingual UI, complete KoKonna driver and safe automation
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from typing import Protocol
|
||||
|
||||
|
||||
class WeatherProvider(Protocol):
|
||||
def get_current(self) -> dict: ...
|
||||
def get_forecast(self) -> list[dict]: ...
|
||||
|
||||
|
||||
class MockWeatherProvider:
|
||||
def get_current(self):
|
||||
return {
|
||||
"location": "上海",
|
||||
"temperature": "--",
|
||||
"summary": "天气演示数据 · 尚未连接实时天气源",
|
||||
"mock": True,
|
||||
}
|
||||
|
||||
def get_forecast(self):
|
||||
return []
|
||||
Reference in New Issue
Block a user