Skip to content

Default values replace the custom input ones in MagneticStructureEnumerator #4184

Closed
@fraricci

Description

@fraricci

I think there is a bug in this line

transformation_kwargs.update(default_transformation_kwargs)

The update method will overwrite the values in the keys of the 'transformation_kwargs' coming from the input, e.g. timeout cannot be changed because of this.

transformation_kwargs={"timeout":1}
default_transformation_kwargs = {"check_ordered_symmetry": False, "timeout": 5}
transformation_kwargs = transformation_kwargs or {}
print(transformation_kwargs)
transformation_kwargs.update(default_transformation_kwargs)
print(transformation_kwargs)

: {'timeout': 1}
: {'timeout': 5, 'check_ordered_symmetry': False}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions