Coding style
- Use staticmethod where possible.
This commit is contained in:
parent
d5ab419fc2
commit
0ab831e48b
3 changed files with 6 additions and 3 deletions
|
|
@ -127,7 +127,8 @@ class CharStyle:
|
|||
attributes.append("u")
|
||||
return f"<CharStyle: fg:{self.fg_color} bg:{self.bg_color} attr:{','.join(attributes)}>"
|
||||
|
||||
def _color_code(self, color_, is_foreground):
|
||||
@staticmethod
|
||||
def _color_code(color_, is_foreground):
|
||||
if isinstance(color_, int):
|
||||
return color(color_, is_foreground)
|
||||
else: # true color
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue