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:
parent
b6ca03ce47
commit
c2fe0d0120
17 changed files with 107 additions and 57 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue