Bring back typing check. Meanwhile just for homeassistant/*.py (#14410)

* Bring back typing check. Meanwhile just for homeassistant/.py

* Change follow-imports to silent. Add a few more checks.
This commit is contained in:
Andrey 2018-05-13 00:44:53 +03:00 committed by Paulus Schoutsen
parent 70af7e5fad
commit 7aec098a05
11 changed files with 41 additions and 30 deletions

View file

@ -1,4 +1,5 @@
"""The exceptions used by Home Assistant."""
import jinja2
class HomeAssistantError(Exception):
@ -22,7 +23,7 @@ class NoEntitySpecifiedError(HomeAssistantError):
class TemplateError(HomeAssistantError):
"""Error during template rendering."""
def __init__(self, exception):
def __init__(self, exception: jinja2.TemplateError) -> None:
"""Init the error."""
super().__init__('{}: {}'.format(exception.__class__.__name__,
exception))