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

@ -81,7 +81,8 @@ def test_from_config_dict_not_mount_deps_folder(loop):
async def test_async_from_config_file_not_mount_deps_folder(loop):
"""Test that we not mount the deps folder inside async_from_config_file."""
hass = Mock(async_add_job=Mock(side_effect=lambda *args: mock_coro()))
hass = Mock(
async_add_executor_job=Mock(side_effect=lambda *args: mock_coro()))
with patch('homeassistant.bootstrap.is_virtual_env', return_value=False), \
patch('homeassistant.bootstrap.async_enable_logging',