We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In Textual 2.0, passing rich Text as TabPane title causes an exception:
Text
TabPane
MarkupError: 'Text' object has no attribute 'splitlines'
This should work since title is typed as TextType = Union[str, "Text"].
TextType = Union[str, "Text"]
To reproduce:
from rich.text import Text from textual.app import App, ComposeResult from textual.widgets import Static, TabbedContent, TabPane class BugApp(App): def compose(self) -> ComposeResult: with TabbedContent(): with TabPane(Text("Tab")): yield Static("Content") if __name__ == "__main__": app = BugApp() app.run()
The text was updated successfully, but these errors were encountered:
Thank you for your issue. Give us a little time to review it.
PS. You might want to check the FAQ if you haven't done so already.
This is an automated reply, generated by FAQtory
Sorry, something went wrong.
Latest source code defines title as ContentType (https://github.com/Textualize/textual/blob/main/src/textual/widgets/_tabbed_content.py#L208)
title
ContentType
Oh, I must have had a cached version I was looking at somehow. Sorry about the noise.
Don't forget to star the repository!
Follow @textualizeio for Textual updates.
No branches or pull requests
In Textual 2.0, passing rich
Text
asTabPane
title causes an exception:This should work since title is typed as
TextType = Union[str, "Text"]
.To reproduce:
Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
The text was updated successfully, but these errors were encountered: