Make typing checks more strict (#14429)

## Description:

Make typing checks more strict: add `--strict-optional` flag that forbids implicit None return type. This flag will become default in the next version of mypy (0.600)

Add `homeassistant/util/` to checked dirs.

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
This commit is contained in:
Andrey 2018-07-13 13:24:51 +03:00 committed by GitHub
parent b6ca03ce47
commit c2fe0d0120
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 107 additions and 57 deletions

View file

@ -4,8 +4,6 @@ Register an iFrame front end panel.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/panel_iframe/
"""
import asyncio
import voluptuous as vol
from homeassistant.const import (CONF_ICON, CONF_URL)
@ -34,11 +32,10 @@ CONFIG_SCHEMA = vol.Schema({
}})}, extra=vol.ALLOW_EXTRA)
@asyncio.coroutine
def setup(hass, config):
async def async_setup(hass, config):
"""Set up the iFrame frontend panels."""
for url_path, info in config[DOMAIN].items():
yield from hass.components.frontend.async_register_built_in_panel(
await hass.components.frontend.async_register_built_in_panel(
'iframe', info.get(CONF_TITLE), info.get(CONF_ICON),
url_path, {'url': info[CONF_URL]})