Update typing 11 (#48072)

This commit is contained in:
Marc Mueller 2021-03-18 13:21:46 +01:00 committed by GitHub
parent 99f9f8dec0
commit 3d2b81a401
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 206 additions and 154 deletions

View file

@ -1,6 +1,8 @@
"""Config flow for Plum Lightpad."""
from __future__ import annotations
import logging
from typing import Any, Dict, Optional
from typing import Any
from aiohttp import ContentTypeError
from requests.exceptions import ConnectTimeout, HTTPError
@ -34,8 +36,8 @@ class PlumLightpadConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
)
async def async_step_user(
self, user_input: Optional[ConfigType] = None
) -> Dict[str, Any]:
self, user_input: ConfigType | None = None
) -> dict[str, Any]:
"""Handle a flow initialized by the user or redirected to by import."""
if not user_input:
return self._show_form()
@ -58,7 +60,7 @@ class PlumLightpadConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
)
async def async_step_import(
self, import_config: Optional[ConfigType]
) -> Dict[str, Any]:
self, import_config: ConfigType | None
) -> dict[str, Any]:
"""Import a config entry from configuration.yaml."""
return await self.async_step_user(import_config)