From 74571ba55f66cba9ed18945212af4afab6a2cab6 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 6 Oct 2021 23:29:48 +0300 Subject: [PATCH] Add missing `keywords` type annotations --- src/_pytest/python.py | 2 +- src/_pytest/reports.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index b71f1bbfc..9b1d3119b 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1637,7 +1637,7 @@ class Function(PyobjMixin, nodes.Item): config: Optional[Config] = None, callspec: Optional[CallSpec2] = None, callobj=NOTSET, - keywords=None, + keywords: Optional[Mapping[str, Any]] = None, session: Optional[Session] = None, fixtureinfo: Optional[FuncFixtureInfo] = None, originalname: Optional[str] = None, diff --git a/src/_pytest/reports.py b/src/_pytest/reports.py index a68e68bc5..725fdf617 100644 --- a/src/_pytest/reports.py +++ b/src/_pytest/reports.py @@ -7,6 +7,7 @@ from typing import Dict from typing import Iterable from typing import Iterator from typing import List +from typing import Mapping from typing import Optional from typing import Tuple from typing import Type @@ -254,7 +255,7 @@ class TestReport(BaseReport): self, nodeid: str, location: Tuple[str, Optional[int], str], - keywords, + keywords: Mapping[str, Any], outcome: "Literal['passed', 'failed', 'skipped']", longrepr: Union[ None, ExceptionInfo[BaseException], Tuple[str, int, str], str, TerminalRepr