@@ -737,6 +737,8 @@ def ljustify_text(text: str, *, fill_char: str = ' ', width: Optional[int] = Non
737737 :param tab_width: any tabs in the text will be replaced with this many spaces. if fill_char is a tab, then it will
738738 be converted to a space.
739739 :return: left-justified text
740+ :raises: TypeError if fill_char is more than one character
741+ ValueError if text or fill_char contains an unprintable character
740742 """
741743 return align_text (text , fill_char = fill_char , width = width ,
742744 tab_width = tab_width , alignment = TextAlignment .LEFT )
@@ -754,6 +756,8 @@ def center_text(text: str, *, fill_char: str = ' ', width: Optional[int] = None,
754756 :param tab_width: any tabs in the text will be replaced with this many spaces. if fill_char is a tab, then it will
755757 be converted to a space.
756758 :return: centered text
759+ :raises: TypeError if fill_char is more than one character
760+ ValueError if text or fill_char contains an unprintable character
757761 """
758762 return align_text (text , fill_char = fill_char , width = width ,
759763 tab_width = tab_width , alignment = TextAlignment .CENTER )
@@ -771,6 +775,8 @@ def rjustify_text(text: str, *, fill_char: str = ' ', width: Optional[int] = Non
771775 :param tab_width: any tabs in the text will be replaced with this many spaces. if fill_char is a tab, then it will
772776 be converted to a space.
773777 :return: right-justified text
778+ :raises: TypeError if fill_char is more than one character
779+ ValueError if text or fill_char contains an unprintable character
774780 """
775781 return align_text (text , fill_char = fill_char , width = width ,
776782 tab_width = tab_width , alignment = TextAlignment .RIGHT )
0 commit comments