From 713e801e6fec8366be9a1c595bf8d319b98db695 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 13 May 2023 22:16:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/_pytest/monkeypatch.py | 6 +++++- testing/typing_checks.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/_pytest/monkeypatch.py b/src/_pytest/monkeypatch.py index 1df864b05..6d63da443 100644 --- a/src/_pytest/monkeypatch.py +++ b/src/_pytest/monkeypatch.py @@ -295,7 +295,11 @@ class MonkeyPatch: self._setitem.append((dic, name, dic.get(name, notset))) dic[name] = value - def delitem(self, dic: Mapping[K, V], name: K, raising: bool = True, + def delitem( + self, + dic: Mapping[K, V], + name: K, + raising: bool = True, ) -> None: """Delete ``name`` from dict. diff --git a/testing/typing_checks.py b/testing/typing_checks.py index 1f69430ee..765837bb4 100644 --- a/testing/typing_checks.py +++ b/testing/typing_checks.py @@ -41,6 +41,7 @@ def check_monkeypatch_typeddict(monkeypatch: MonkeyPatch) -> None: class Foo(TypedDict): x: int y: float + a: Foo = {"x": 1, "y": 3.14} monkeypatch.setitem("x", 2) monkeypatch.delitem("y")