Avoid setting percent to None in tui.py

This commit is contained in:
2Shirt 2023-06-03 18:58:46 -07:00
parent 8e7d202c32
commit 7ab6ccbd36
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -35,7 +35,7 @@ class TUI():
self.side_width: int = TMUX_SIDE_WIDTH
self.title_text: str = title_text if title_text else 'Title Text'
self.title_text_line2: str = ''
self.title_colors: list[str | None] = ['BLUE', None]
self.title_colors: list[str] = ['BLUE', '']
# Init tmux and start a background process to maintain layout
self.init_tmux()
@ -47,7 +47,7 @@ class TUI():
def add_info_pane(
self,
lines: int | None = None,
percent: int | None = None,
percent: int = 0,
update_layout: bool = True,
**tmux_args,
) -> None:
@ -117,7 +117,7 @@ class TUI():
def add_worker_pane(
self,
lines: int | None = None,
percent: int | None = None,
percent: int = 0,
update_layout: bool = True,
**tmux_args,
) -> None:
@ -136,7 +136,7 @@ class TUI():
tmux_args.update({
'behind': False,
'lines': lines,
'percent': percent,
'percent': percent if percent else None,
'target_id': None,
'vertical': True,
})