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

Don't hard-code class names in TraitListEvent.__repr__ and similar __repr__ implementations #1333

Closed
mdickinson opened this issue Nov 2, 2020 · 0 comments · Fixed by #1335
Assignees
Milestone

Comments

@mdickinson
Copy link
Member

We currently hardcode the TraitListEvent class name in TraitListEvent.__repr__; instead, we should use self.__class__.__name__, so that subclasses don't have a misleading __repr__. See

return "TraitListEvent(index={!r}, removed={!r}, added={!r})".format(

I haven't checked other __repr__s, but we will almost certainly need to update TraitDictEvent and TraitSetEvent similarly, and possibly others, too.

Ref: enthought/envisage#352

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants