diff --git a/homeassistant/util/yaml/loader.py b/homeassistant/util/yaml/loader.py index 5e98e4cfc6f..58edac6d280 100644 --- a/homeassistant/util/yaml/loader.py +++ b/homeassistant/util/yaml/loader.py @@ -98,10 +98,10 @@ class SafeLineLoader(yaml.SafeLoader): super().__init__(stream) self.secrets = secrets - def compose_node(self, parent: yaml.nodes.Node, index: int) -> yaml.nodes.Node: + def compose_node(self, parent: yaml.nodes.Node, index: int) -> yaml.nodes.Node: # type: ignore[override] """Annotate a node with the first line it was seen.""" last_line: int = self.line - node: yaml.nodes.Node = super().compose_node(parent, index) + node: yaml.nodes.Node = super().compose_node(parent, index) # type: ignore[assignment] node.__line__ = last_line + 1 # type: ignore return node @@ -264,7 +264,7 @@ def _ordered_dict(loader: SafeLineLoader, node: yaml.nodes.MappingNode) -> Order fname = getattr(loader.stream, "name", "") raise yaml.MarkedYAMLError( context=f'invalid key: "{key}"', - context_mark=yaml.Mark(fname, 0, line, -1, None, None), + context_mark=yaml.Mark(fname, 0, line, -1, None, None), # type: ignore[arg-type] ) from exc if key in seen: diff --git a/requirements_test.txt b/requirements_test.txt index 25a542d3ffb..660ea2a11fd 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -8,7 +8,7 @@ codecov==2.1.11 coverage==5.5 jsonpickle==1.4.1 mock-open==1.4.0 -mypy==0.812 +mypy==0.902 pre-commit==2.13.0 pylint==2.8.3 pipdeptree==1.0.0 @@ -25,3 +25,19 @@ responses==0.12.0 respx==0.17.0 stdlib-list==0.7.0 tqdm==4.49.0 +types-backports==0.1.2 +types-certifi==0.1.3 +types-chardet==0.1.2 +types-cryptography==3.3.2 +types-decorator==0.1.4 +types-emoji==1.2.1 +types-enum34==0.1.5 +types-ipaddress==0.1.2 +types-jwt==0.1.3 +types-pkg-resources==0.1.2 +types-python-slugify==0.1.0 +types-pytz==0.1.1 +types-PyYAML==5.4.1 +types-requests==0.1.11 +types-toml==0.1.2 +types-ujson==0.1.0