Upgrade mypy to 0.902 (#51907)

This commit is contained in:
Franck Nijhof 2021-06-16 14:35:32 +02:00 committed by GitHub
parent 4655e3aa08
commit 13bf5dbee4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions

View file

@ -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:

View file

@ -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