Skip to content

Used defult_factory for mutable dataclass defults - #1

Open
jacobsvennevik wants to merge 2 commits into
FieteLab:mainfrom
jacobsvennevik:main
Open

Used defult_factory for mutable dataclass defults#1
jacobsvennevik wants to merge 2 commits into
FieteLab:mainfrom
jacobsvennevik:main

Conversation

@jacobsvennevik

Copy link
Copy Markdown

Found a bug trying to extend the package with a 3-dimensional torus. Related to the dataclass mutable check, manifolds.py and qan.py break at import time with ValueError: mutable default ... is not allowed: use default_factory.

Fix: Replaced all mutable field defaults with field(default_factory=...) in both files.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@jacobsvennevik