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