From 3a18f3f89487f3a7fef38f0b2d7ea8fe36b3405c Mon Sep 17 00:00:00 2001 From: BuonSamaritan Date: Thu, 14 May 2026 18:17:48 +0200 Subject: [PATCH] Fix style_definition check to handle string input --- rich/style.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rich/style.py b/rich/style.py index 3806a8c4b9..3061f04d35 100644 --- a/rich/style.py +++ b/rich/style.py @@ -507,7 +507,7 @@ def parse(cls, style_definition: str) -> "Style": Returns: `Style`: A Style instance. """ - if style_definition.strip() == "none" or not style_definition: + if str(style_definition).strip() == "none" or not style_definition: return cls.null() STYLE_ATTRIBUTES = cls.STYLE_ATTRIBUTES