fixes bug when setting --style=disabled (we were stil getting coloured check/cross marks)

This commit is contained in:
onyx-and-iris 2025-06-27 12:57:34 +01:00
parent d628c5d3a4
commit 157e1a167c

View File

@ -42,11 +42,6 @@ class Disabled(Style):
column: str = 'none'
highlight: str = 'none'
def __post_init__(self):
"""Post-initialization to set default values."""
super().__post_init__()
os.environ['NO_COLOR'] = '1'
@register_style
@dataclass
@ -182,4 +177,7 @@ class Black(Style):
def request_style_obj(style_name: str, no_border: bool) -> Style:
"""Entry point for style objects. Returns a Style object based on the style name."""
if style_name == 'disabled':
os.environ['NO_COLOR'] = '1'
return registry[style_name.lower()](no_border=no_border)