Skip to content

Commit 82661bb

Browse files
committed
Update scadnano.py
1 parent 09ad91b commit 82661bb

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

scadnano/scadnano.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5746,8 +5746,7 @@ def _helices_and_groups_and_grid_from_json(json_map: Dict) \
57465746
return helices, groups, grid
57475747

57485748
@staticmethod
5749-
def from_scadnano_json_map(
5750-
json_map: dict) -> Design:
5749+
def from_scadnano_json_map(json_map: dict) -> Design:
57515750
"""
57525751
Loads a :any:`Design` from the given JSON object (i.e., Python object obtained by calling
57535752
json.loads(json_str) from a string representing contents of a JSON file.
@@ -5809,7 +5808,7 @@ def from_scadnano_json_map(
58095808
print(f'WARNING: key {mod_key} does not match vendor_code field {mod.vendor_code}'
58105809
f'for modification {mod}\n'
58115810
f'replacing with key = {mod.vendor_code}')
5812-
mod = dataclasses.replace(mod, vendor_code=mod_key)
5811+
mod_key = mod.vendor_code
58135812
all_mods[mod_key] = mod
58145813

58155814
Design.assign_modifications_to_strands(strands, strand_jsons, mods_5p, mods_3p, mods_int, all_mods)

0 commit comments

Comments
 (0)