MCPcopy
hub / github.com/Textualize/rich / chain

Method chain

rich/style.py:614–624  ·  view source on GitHub ↗

Combine styles from positional argument in to a single style. Args: *styles (Iterable[Style]): Styles to combine. Returns: Style: A new style instance.

(cls, *styles: "Style")

Source from the content-addressed store, hash-verified

612
613 @classmethod
614 def chain(cls, *styles: "Style") -> "Style":
615 """Combine styles from positional argument in to a single style.
616
617 Args:
618 *styles (Iterable[Style]): Styles to combine.
619
620 Returns:
621 Style: A new style instance.
622 """
623 iter_styles = iter(styles)
624 return sum(iter_styles, next(iter_styles))
625
626 def copy(self) -> "Style":
627 """Get a copy of this style.

Callers 2

test_chainFunction · 0.80
_get_number_stylesMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_chainFunction · 0.64