Skip to content

Tree layout root_vertex=None check never reached #3420

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

Closed
Nikhil-42 opened this issue Oct 26, 2023 · 0 comments · Fixed by #3421
Closed

Tree layout root_vertex=None check never reached #3420

Nikhil-42 opened this issue Oct 26, 2023 · 0 comments · Fixed by #3421

Comments

@Nikhil-42
Copy link
Contributor

Description of bug / unexpected behavior

In graph.py::_tree_layout root_vertex is used before the corresponding check for None meaning the intended error message is never printed.

Expected behavior

When a Graph with layout="tree" is used without specifying a root node, the appropriate ValueError should be thrown.

How to reproduce the issue

Create a Graph object with the "tree" layout and do not specify a root node.

Code for reproducing the problem
from manim import *

class ChangeGraphLayout(Scene):
                def construct(self):
                    G = Graph([1, 2, 3, 4, 5], [(1, 2), (1, 3), (2, 4), (2, 5)], layout="tree")
                    self.wait()
@github-project-automation github-project-automation bot moved this to 🆕 New in Dev Board Oct 26, 2023
@behackl behackl linked a pull request Oct 26, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

1 participant