feat(parser): use ParserError in parsers

This commit is contained in:
2026-09-23 16:12:13 +03:00
parent 73df7a2b5d
commit 829a12612e
6 changed files with 30 additions and 26 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ from gallery.sketch.weather.model import (
from gallery.sketch.weather.parse.wind import WIND_DIRECTION_PARSER
from gallery.sketch.weather.util import convert_hPa_to_mmHg
from . import PROVIDER
from .openweather import Forecast, ForecastItem
from .openweather import Location as OpenWeatherLocation
@@ -71,7 +72,7 @@ class OpenWeatherLocationParser(Parser[list[OpenWeatherLocation], list[Location]
Location(
id=f"{item.lat}:{item.lon}",
name=item.name,
provider="openweather",
provider=PROVIDER,
lat=item.lat,
lon=item.lon,
country=item.country,