[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-05-13 22:16:01 +00:00
parent 8bc212caf7
commit 713e801e6f
2 changed files with 6 additions and 1 deletions

View File

@ -295,7 +295,11 @@ class MonkeyPatch:
self._setitem.append((dic, name, dic.get(name, notset))) self._setitem.append((dic, name, dic.get(name, notset)))
dic[name] = value 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: ) -> None:
"""Delete ``name`` from dict. """Delete ``name`` from dict.

View File

@ -41,6 +41,7 @@ def check_monkeypatch_typeddict(monkeypatch: MonkeyPatch) -> None:
class Foo(TypedDict): class Foo(TypedDict):
x: int x: int
y: float y: float
a: Foo = {"x": 1, "y": 3.14} a: Foo = {"x": 1, "y": 3.14}
monkeypatch.setitem("x", 2) monkeypatch.setitem("x", 2)
monkeypatch.delitem("y") monkeypatch.delitem("y")