* De-run_forever()-ization
* Use asyncio.run (or our own implementation on Python <3.7)
* hass.start is only used by tests
* setup_and_run_hass() is now async
* Add "main" async hass.run method
* move SIGINT handling to helpers/signal.py
* add flag to .run to disable hass's signal handlers
* Teach async_start and async_stop to not step on each other
(more than necessary)
* shorten over-long lines
* restore missing "import asyncio"
* move run_asyncio to homeassistant.util.async_
* LOGGER: warn => warning
* Add "force" flag to async_stop
only useful for testing
* Add 'attrs==18.2.0' to requirements_all.txt
Required for keeping requirements_test_all.txt in sync, where it is in
turn required to prevent auto-downgrading "attrs" during "pip install"
* Fixes for mypy
* Fix "mock_signal" fixture
* Revert mistaken edit
* Flake8 fixes
* mypy fixes
* pylint fix
* Revert adding attrs== to requirements_test*.txt
solved by using "pip -c"
* Rename "run" to "async_run", as per calling conventions
* Don't treat typing as an "in-between" module for import order
That was a < 3.5 era thing.
* Tighten scope of some pylint unused-import disables
To avoid isort moving a top level one around, undesirably broadening its
scope.
* Add context
* Add context to switch/light services
* Test set_state API
* Lint
* Fix tests
* Do not include context yet in comparison
* Do not pass in loop
* Fix Z-Wave tests
* Add websocket test without user
## Description:
More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).
## Checklist:
- [ ] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
## Description:
More typing improvements.
Switch to using `mypy.ini` for flexibility
Add `warn_return_any` check except in `homeassistant.util.yaml` that does typing hacks. Fix some type annotations as resulting from this check and ignore others were fixing is hard.
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
## 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**
* Add storage helper
* Migrate config entries to use the storage helper
* Make sure tests do not do I/O
* Lint
* Add versions to stored data
* Add more instance variables
* Make migrator load config if nothing to migrate
* Address comments
* phue -> aiohue
* Clean up
* Fix config
* Address comments
* Typo
* Fix rebase error
* Mark light as unavailable when bridge is disconnected
* Tests
* Make Throttle work with double delay and async
* Rework update logic
* Don't resolve host to IP
* Clarify comment
* No longer do unnecessary updates
* Add more doc
* Another comment update
* Wrap up tests
* Lint
* Fix tests
* PyLint does not like mix 'n match async and coroutine
* Lint
* Update aiohue to 1.2
* Lint
* Fix await MagicMock
* Lazy loading of service descriptions
* Fix tests
* Load YAML in executor
* Return a copy of available services to allow mutations
* Remove lint
* Add zha/services.yaml
* Only cache descriptions for known services
* Remove lint
* Remove description loading during service registration
* Remove description parameter from async_register
* Test async_get_all_descriptions
* Remove lint
* Fix typos from multi-edit
* Remove unused arguments
* Remove unused import os
* Remove unused import os, part 2
* Remove unneeded coroutine decorator
* Only use executor for loading files
* Cleanups suggested in review
* Increase test coverage
* Fix races in existing tests
* Recorder exception catch for long state string
* Revert - Recorder exception catch for long state string
* Validate state length at core level
* Revert - this reverts commit 9d6bd017d9.
* Revert - Recorder exception catch for long state string
* Fix state TypeError
* Test for long state exception