Skip to content

Mark traits as "transient" instead of explicitly overriding traits __getstate__ #795

@rahulporuri

Description

@rahulporuri

enable/enable/scrolled.py

Lines 614 to 619 in 6850385

def __getstate__(self):
state = super().__getstate__()
for key in ["alternate_vsb", "_vsb", "_hsb"]:
if key in state:
del state[key]
return state

def __getstate__(self):
attribs = ("component", "bgcolor", "overlay", "_scroll_origin")
state = {}
for attrib in attribs:
state[attrib] = getattr(self, attrib)
return state

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