Fix a couple style issues
This commit is contained in:
parent
2a4163b2c7
commit
64b6852ae3
@ -488,8 +488,7 @@ class TabBar(QTabBar):
|
||||
|
||||
def _pinned_statistics(self) -> (int, int):
|
||||
"""Get the number of pinned tabs and the total width of pinned tabs."""
|
||||
pinned_list = [idx
|
||||
for idx in range(self.count())
|
||||
pinned_list = [idx for idx in range(self.count())
|
||||
if self._tab_pinned(idx)]
|
||||
pinned_count = len(pinned_list)
|
||||
pinned_width = sum(self.minimumTabSizeHint(idx, ellipsis=False).width()
|
||||
|
@ -185,8 +185,8 @@ def debug_cache_stats():
|
||||
tabbed_browser = objreg.get('tabbed-browser', scope='window',
|
||||
window='last-focused')
|
||||
# pylint: disable=protected-access
|
||||
tabbed_browser_info = tabbed_browser.tabBar(). \
|
||||
_minimum_tab_size_hint_helper.cache_info()
|
||||
tab_bar = tabbed_browser.tabBar()
|
||||
tabbed_browser_info = tab_bar._minimum_tab_size_hint_helper.cache_info()
|
||||
# pylint: enable=protected-access
|
||||
|
||||
log.misc.debug('is_valid_prefix: {}'.format(prefix_info))
|
||||
|
@ -64,9 +64,4 @@ class TestTabWidget:
|
||||
with qtbot.waitExposed(widget):
|
||||
widget.show()
|
||||
|
||||
def bench():
|
||||
for _a in range(1000):
|
||||
# pylint: disable=protected-access
|
||||
widget._update_tab_titles()
|
||||
# pylint: enable=protected-access
|
||||
benchmark(bench)
|
||||
benchmark(widget._update_tab_titles)
|
||||
|
Loading…
Reference in New Issue
Block a user