Skip to content

Commit

Permalink
Remove MappingProxyType in favour of copy (#338)
Browse files Browse the repository at this point in the history
* rm mapping proxy type in favour of copy
  • Loading branch information
danlessa authored Dec 21, 2023
1 parent 47e26b8 commit ebc921d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cadCAD/engine/simulation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Any, Callable, Dict, List, Tuple
from copy import deepcopy
from types import MappingProxyType
from copy import deepcopy, copy
from functools import reduce
from funcy import curry # type: ignore

Expand Down Expand Up @@ -161,7 +160,7 @@ def partial_state_update(

if type(additional_objs) == dict:
if additional_objs.get('deepcopy_off', False) == True:
last_in_obj = MappingProxyType(sL[-1])
last_in_obj = copy(sL[-1])
if len(additional_objs) == 1:
additional_objs = None
# XXX: drop the additional objects if only used for deepcopy
Expand Down

0 comments on commit ebc921d

Please sign in to comment.