From 597209dd488d846acee5432bec6a8d1f4654566f Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Wed, 14 Dec 2022 09:40:33 -0800 Subject: [PATCH] Remove redundant AsyncMagicMixin.__init__ method --- Lib/unittest/mock.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 03e93d15101453..50e9e5b287849a 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -2133,10 +2133,8 @@ def mock_add_spec(self, spec, spec_set=False): class AsyncMagicMixin(MagicMixin): - def __init__(self, /, *args, **kw): - self._mock_set_magics() # make magic work for kwargs in init - _safe_super(AsyncMagicMixin, self).__init__(*args, **kw) - self._mock_set_magics() # fix magic broken by upper level init + pass + class MagicMock(MagicMixin, Mock): """