* Remove malformed pylint disable markers
* Remove some unused imports
* Remove some unneeded lint exclusions
* Remove more unneeded lint exclusions
* Add specific codes to all noqa's
* Install our core dependencies for mypy in azure
To match local setups and tox.
* Use "system" mypy in pre-commit instead of the "real" mypy hook
The results of mypy depend on what is installed. And the mypy hook
runs in a virtualenv of its own, meaning we'd need to install and
maintain another set of our dependencies there... no. Use the "system"
one and reuse the environment that is set up anyway already instead.
* Reintroduce needed ruamel.yaml type ignore
This ignore is required when ruamel.yaml is installed, and we want it
to be as it's part of the core dependency set.
* Upgrade pydocstyle to 4.0.0 and flake8-docstrings to 1.3.1
http://www.pydocstyle.org/en/4.0.0/release_notes.html#july-6th-2019
* Address pydocstyle D413's
* tox: do not run pydocstyle
Does not seem to add any value over flake8-docstrings (and would have
needed a D202 exclusion).
* Revert "Add some debugging to azure mypy job (#25632)"
This reverts commit 767b8e9f25.
No longer needed.
* Install setup.py dependencies for mypy in Azure
For better coverage, and to match what tox does.
* Type check all helpers, add inline exclusions for work in progress
* Remove unused Script._template_cache
* Add some missing type hints
* Remove unneeded type: ignore
* Type hint fixes
* Mypy assistance tweaks
* Don't look for None in deprecated config "at most once" check
* Avoid None name slugify attempt when generating entity id
* Avoid None state store attempt on entity remove
* Start moving parts of yaml utils to own module
Move parts of yaml loader out of the single large file and start
to create the structure of the yaml loaders in Ansible [0].
[0]: https://github.com/ansible/ansible/tree/devel/lib/ansible/parsing/yaml
* Finish yaml migration, update tests and mocks
* Move code around to finish the migration
* Update the mocks so that `open` is patched in
`homeassistant.util.yaml.loader` instead of
`homeassistant.util.yaml`.
* Updated mypy ignores
* Updated external API of `homeasistant.util.yaml`, see below:
Checked what part of the api of `homeassistant.util.yaml` was actually
called from outside the tests and added an `__ALL__` that contains only
these elements.
Updated the tests so that references to internal parts of the API (e.g.
the yaml module imported into `homeassistant.util.yaml.loader`) are
referenced directly from `homeassistant.util.yaml.loader`.
In `tests/test_yaml.py` the import `yaml` refers to
`homeassistant.util.yaml` and `yaml_loader` refers to `~.loader`.
Future work that remains for the next iteration is to create a custom
SafeConstructor and refers to that instead of monkey patching `yaml` with
custom loaders.
* Update mocks in yaml dumper, check_config
## Description:
Switches elevation helper to use [Open Elevation](https://open-elevation.com/) instead of Google Maps API which now requires a API key. It's a drop in replacement for Google Maps too!
**Related issue (if applicable):** fixes#19860
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.