[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
8bc212caf7
commit
713e801e6f
|
@ -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.
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue