1
mirror of https://github.com/home-assistant/core synced 2024-09-12 15:16:21 +02:00

Fix picnic typing (#82476)

This commit is contained in:
Marc Mueller 2022-11-21 19:00:34 +01:00 committed by GitHub
parent a88e865dff
commit 848821139d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,8 @@
"""Services for the Picnic integration."""
from __future__ import annotations
from typing import cast
from python_picnic_api import PicnicAPI
import voluptuous as vol
@ -64,7 +66,7 @@ async def handle_add_product(
product_id = call.data.get("product_id")
if not product_id:
product_id = await hass.async_add_executor_job(
_product_search, api_client, call.data.get("product_name")
_product_search, api_client, cast(str, call.data["product_name"])
)
if not product_id: