Skip to content
Snippets Groups Projects
Commit 20f6864c authored by Alán Muñoz's avatar Alán Muñoz
Browse files

add copy to defaults to avoid mutation

parent 2b462381
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ from abc import ABC, abstractmethod
from collections.abc import Iterable
from pathlib import Path, PosixPath
from typing import Union
from copy import copy
from yaml import dump, safe_load
......@@ -79,7 +80,7 @@ class ParametersABC(ABC):
@classmethod
def default(cls, **kwargs):
overriden_defaults = cls._defaults
overriden_defaults = copy(cls._defaults)
for k, v in kwargs.items():
overriden_defaults[k] = v
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment