@@ -150,7 +150,7 @@ def __call__(self):
150
150
def __init__ (
151
151
self ,
152
152
left : Cycler [K , V ] | Iterable [dict [K , V ]] | None ,
153
- right : Cycler [K , V ] | Iterable [ dict [ K , V ]] | None = None ,
153
+ right : Cycler [K , V ] | None = None ,
154
154
op : Any = None ,
155
155
):
156
156
"""
@@ -170,13 +170,9 @@ def __init__(
170
170
self ._left = []
171
171
172
172
if isinstance (right , Cycler ):
173
- self ._right : Cycler [K , V ] | list [ dict [ K , V ]] | None = Cycler (
173
+ self ._right : Cycler [K , V ] | None = Cycler (
174
174
right ._left , right ._right , right ._op
175
175
)
176
- elif right is not None :
177
- # Need to copy the dictionary or else that will be a residual
178
- # mutable that could lead to strange errors
179
- self ._right = [copy .copy (v ) for v in right ]
180
176
else :
181
177
self ._right = None
182
178
@@ -214,11 +210,7 @@ def change_key(self, old: K, new: K) -> None:
214
210
self ._keys .remove (old )
215
211
self ._keys .add (new )
216
212
217
- if (
218
- self ._right is not None
219
- and isinstance (self ._right , Cycler )
220
- and old in self ._right .keys
221
- ):
213
+ if self ._right is not None and old in self ._right .keys :
222
214
self ._right .change_key (old , new )
223
215
224
216
# self._left should always be non-None
0 commit comments