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

TraitListObject._validate_length has bad error message #1170

Closed
mdickinson opened this issue Jun 1, 2020 · 0 comments · Fixed by #1173
Closed

TraitListObject._validate_length has bad error message #1170

mdickinson opened this issue Jun 1, 2020 · 0 comments · Fixed by #1173

Comments

@mdickinson
Copy link
Member

The _validate_length method of TraitListObject uses object in its error message, but in that context, object is not a local variable but instead refers to the built-in object type.

This results in error messages that look like:

The 'windows' trait of a type instance must be a list of items which are an envisage.ui.tasks.task_window.TaskWindow or None, but you attempted to change its length to -1 elements.

Code link:

class_of(object),
self.trait.full_info(object, self.name, Undefined),

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.

1 participant