mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Upgrade mypy to 0.902 (#51907)
This commit is contained in:
parent
4655e3aa08
commit
13bf5dbee4
@ -98,10 +98,10 @@ class SafeLineLoader(yaml.SafeLoader):
|
|||||||
super().__init__(stream)
|
super().__init__(stream)
|
||||||
self.secrets = secrets
|
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."""
|
"""Annotate a node with the first line it was seen."""
|
||||||
last_line: int = self.line
|
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
|
node.__line__ = last_line + 1 # type: ignore
|
||||||
return node
|
return node
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ def _ordered_dict(loader: SafeLineLoader, node: yaml.nodes.MappingNode) -> Order
|
|||||||
fname = getattr(loader.stream, "name", "")
|
fname = getattr(loader.stream, "name", "")
|
||||||
raise yaml.MarkedYAMLError(
|
raise yaml.MarkedYAMLError(
|
||||||
context=f'invalid key: "{key}"',
|
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
|
) from exc
|
||||||
|
|
||||||
if key in seen:
|
if key in seen:
|
||||||
|
@ -8,7 +8,7 @@ codecov==2.1.11
|
|||||||
coverage==5.5
|
coverage==5.5
|
||||||
jsonpickle==1.4.1
|
jsonpickle==1.4.1
|
||||||
mock-open==1.4.0
|
mock-open==1.4.0
|
||||||
mypy==0.812
|
mypy==0.902
|
||||||
pre-commit==2.13.0
|
pre-commit==2.13.0
|
||||||
pylint==2.8.3
|
pylint==2.8.3
|
||||||
pipdeptree==1.0.0
|
pipdeptree==1.0.0
|
||||||
@ -25,3 +25,19 @@ responses==0.12.0
|
|||||||
respx==0.17.0
|
respx==0.17.0
|
||||||
stdlib-list==0.7.0
|
stdlib-list==0.7.0
|
||||||
tqdm==4.49.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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user