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

Do not access private Renderer._actors property #682

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

user27182
Copy link

@user27182 user27182 commented Feb 7, 2025

The BackgroundPlotter accesses a private variable of 3rd party imported class, i.e. Renderer._actors. But there is no need to access a private property here since Renderer.actors simply returns Renderer._actors already anyway.

See Renderer.actors source:
https://github.com/pyvista/pyvista/blob/5be64528b73a970df364b4e2dd7ebfa0b62e9b64/pyvista/plotting/renderer.py#L818-L821

The underlying implementation for Renderer._actors is being modified by pyvista/pyvista#7184 and the access to a private variable here by pyvistaqt is causing integration tests to fail unexpectedly.

EDIT: This was addressed upstream by implementing an _actors.items() method, so this change is not strictly needed by pyvista/pyvista#7184, but I still think access to private vars should be avoided here

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

Successfully merging this pull request may close these issues.

1 participant