feat(parser): use ParserError in parsers
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user