* Remove unnecessary exception re-wraps
* Preserve exception chains on re-raise
We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.
The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.
Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.
* Fix mistaken re-wrap in homematicip_cloud/hap.py
Missed the difference between HmipConnectionError and
HmipcConnectionError.
* Do not hide original error on plex new cert validation error
Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
* 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
* 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).
* 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