Let the terminal code change between runs.
This commit is contained in:
parent
c25266c42b
commit
a5ac61d38e
1 changed files with 9 additions and 0 deletions
|
|
@ -59,6 +59,15 @@ class CharStyle:
|
||||||
return (self.fg_color, self.bg_color, self.is_bold, self.is_italic,
|
return (self.fg_color, self.bg_color, self.is_bold, self.is_italic,
|
||||||
self.is_underlined)
|
self.is_underlined)
|
||||||
|
|
||||||
|
def __getstate__(self):
|
||||||
|
state = self.__dict__.copy()
|
||||||
|
if "_cache" in state:
|
||||||
|
del state["_cache"]
|
||||||
|
return state
|
||||||
|
|
||||||
|
def __setstate__(self, state):
|
||||||
|
self.__dict__ = state
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
attributes = []
|
attributes = []
|
||||||
if self.is_bold:
|
if self.is_bold:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue