Skip to content

Commit edd650f

Browse files
committed
Fix TypeError in select_graphic_rendition
- Add private parameter to select_graphic_rendition() method signature - Handle private=True parameter by returning early (no-op for private SGR sequences)
1 parent 9a03817 commit edd650f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyte/screens.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,11 +971,15 @@ def alignment_display(self) -> None:
971971
for x in range(self.columns):
972972
self.buffer[y][x] = self.buffer[y][x]._replace(data="E")
973973

974-
def select_graphic_rendition(self, *attrs: int) -> None:
974+
def select_graphic_rendition(self, *attrs: int, private: bool = False) -> None:
975975
"""Set display attributes.
976976
977977
:param list attrs: a list of display attributes to set.
978+
:param bool private: if True, ignore the SGR sequence (private sequences are not supported).
978979
"""
980+
if private:
981+
return
982+
979983
replace = {}
980984

981985
# Fast path for resetting all attributes.

0 commit comments

Comments
 (0)