Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make DataType's mutable #111

Open
evalott100 opened this issue Jan 15, 2025 · 0 comments
Open

Make DataType's mutable #111

evalott100 opened this issue Jan 15, 2025 · 0 comments
Assignees

Comments

@evalott100
Copy link
Contributor

evalott100 commented Jan 15, 2025

We currently have frozen DataType's, with the callback to update the backend based on changed fields on the DataType taking a whole new DataType:

def update_datatype(self, datatype: DataType[T]) -> None:
if not isinstance(self._datatype, type(datatype)):
raise ValueError(
f"Attribute datatype must be of type {type(self._datatype)}"
)
self._datatype = datatype
for callback in self._update_datatype_callbacks:
callback(datatype)

We should instead make the DataType mutable and have the above method just use self._datatype.

@evalott100 evalott100 self-assigned this Jan 15, 2025
@evalott100 evalott100 changed the title Make DataTypes mutable Make DataType's mutable Jan 15, 2025
@GDYendell GDYendell moved this to Backlog in FastCS Development Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant