Get a copy with a different value for link. Args: link (str, optional): New value for link. Defaults to None. Returns: Style: A new Style instance.
(self, link: Optional[str] = None)
| 669 | return style |
| 670 | |
| 671 | def update_link(self, link: Optional[str] = None) -> "Style": |
| 672 | """Get a copy with a different value for link. |
| 673 | |
| 674 | Args: |
| 675 | link (str, optional): New value for link. Defaults to None. |
| 676 | |
| 677 | Returns: |
| 678 | Style: A new Style instance. |
| 679 | """ |
| 680 | style: Style = self.__new__(Style) |
| 681 | style._ansi = self._ansi |
| 682 | style._style_definition = self._style_definition |
| 683 | style._color = self._color |
| 684 | style._bgcolor = self._bgcolor |
| 685 | style._attributes = self._attributes |
| 686 | style._set_attributes = self._set_attributes |
| 687 | style._link = link |
| 688 | style._link_id = f"{next(_id_generator)}" if link else "" |
| 689 | style._hash = None |
| 690 | style._null = False |
| 691 | style._meta = self._meta |
| 692 | return style |
| 693 | |
| 694 | def render( |
| 695 | self, |
no outgoing calls
no test coverage detected