Skip to content

Comments

Fix Panel crash when box=None#3976

Open
karthiksai109 wants to merge 1 commit intoTextualize:masterfrom
karthiksai109:fix-panel-box-none
Open

Fix Panel crash when box=None#3976
karthiksai109 wants to merge 1 commit intoTextualize:masterfrom
karthiksai109:fix-panel-box-none

Conversation

@karthiksai109
Copy link

Panel.init accepts box as Optional[Box] but passing None causes an AttributeError in rich_console because it calls self.box.substitute() without checking for None first.

This handles box=None throughout the rendering and measurement paths, similar to how Table already supports box=None. When box is None the panel content renders without any border.

Fixes #3609

@TomJGooding
Copy link
Contributor

Panel.init accepts box as Optional[Box]

No it doesn't? The linked issue is already closed because the docstring was corrected to reflect this.

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.

[BUG] Panel docstring says the "box" parameter is optional, when it is not

2 participants