do not store new_backend_vars in State class (#2707)

This commit is contained in:
benedikt-bartscher 2024-02-24 22:56:22 +01:00 committed by GitHub
parent 93f402c773
commit cace611aec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -321,7 +321,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
# Track this new subclass in the parent state's subclasses set.
parent_state.class_subclasses.add(cls)
cls.new_backend_vars = {
new_backend_vars = {
name: value
for name, value in cls.__dict__.items()
if types.is_backend_variable(name, cls)
@ -329,7 +329,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
and not isinstance(value, FunctionType)
}
cls.backend_vars = {**cls.inherited_backend_vars, **cls.new_backend_vars}
cls.backend_vars = {**cls.inherited_backend_vars, **new_backend_vars}
# Set the base and computed vars.
cls.base_vars = {