fix: tab_by_idx returns an optional AbstractTab

This commit is contained in:
thenightmail 2025-07-12 11:09:34 -04:00
parent 565cc22f90
commit 5a309efbd4
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class TabWidget(QTabWidget):
assert isinstance(bar, TabBar), bar
return bar
def _tab_by_idx(self, idx: int) -> Optional[QWidget]:
def _tab_by_idx(self, idx: int) -> Optional[browsertab.AbstractTab]:
"""Get the tab at the given index."""
tab = self.widget(idx)
if tab is not None:
@ -127,7 +127,7 @@ class TabWidget(QTabWidget):
"""
if self._tab_title_update_disabled:
return
assert self._tabbed_browser is not None
if self._tabbed_browser.is_shutting_down:
return