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

Callback method name typo in ChainTransform.__setitem__() #2478

Open
nnop opened this issue Apr 28, 2023 · 2 comments
Open

Callback method name typo in ChainTransform.__setitem__() #2478

nnop opened this issue Apr 28, 2023 · 2 comments

Comments

@nnop
Copy link

nnop commented Apr 28, 2023

def __setitem__(self, index, tr):
self._transforms[index].changed.disconnect(self._subtr_changed)
self._transforms[index] = tr
tr.changed.connect(self.subtr_changed)
self._rebuild_shaders()
self.update()

L215 misspelled _subtr_changed to subtr_changed. But everything seems work well. What would that affect?

@djhoese
Copy link
Member

djhoese commented Apr 28, 2023

Hhhmmm interesting. Thanks for bringing this up. It would suggest that this entire __setitem__ functionality is not used nor tested in vispy. Accessing self.subtr_changed should cause an AttributeError because it shouldn't exist.

How do you feel about creating a pull request to fix this typo at least?

@djhoese
Copy link
Member

djhoese commented Apr 28, 2023

Bonus points if you can add a test that uses the functionality!

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

No branches or pull requests

2 participants