Fix warnings from tox
This commit is contained in:
parent
63dae3a885
commit
aa909c0506
@ -153,7 +153,7 @@ def qute_help(win_id, request):
|
|||||||
"""Handler for qute:help. Return HTML content as bytes."""
|
"""Handler for qute:help. Return HTML content as bytes."""
|
||||||
try:
|
try:
|
||||||
utils.read_file('html/doc/index.html')
|
utils.read_file('html/doc/index.html')
|
||||||
except (FileNotFoundError, NotADirectoryError, OSError, BlockingIOError):
|
except FileNotFoundError:
|
||||||
html = jinja.env.get_template('error.html').render(
|
html = jinja.env.get_template('error.html').render(
|
||||||
title="Error while loading documentation",
|
title="Error while loading documentation",
|
||||||
url=request.url().toDisplayString(),
|
url=request.url().toDisplayString(),
|
||||||
|
@ -23,7 +23,7 @@ import functools
|
|||||||
import collections
|
import collections
|
||||||
|
|
||||||
from PyQt5.QtWidgets import QSizePolicy
|
from PyQt5.QtWidgets import QSizePolicy
|
||||||
from PyQt5.QtCore import pyqtSignal, pyqtSlot, QSize, QTimer, QUrl
|
from PyQt5.QtCore import pyqtSignal, pyqtSlot, QTimer, QUrl
|
||||||
from PyQt5.QtGui import QIcon
|
from PyQt5.QtGui import QIcon
|
||||||
|
|
||||||
from qutebrowser.config import config
|
from qutebrowser.config import config
|
||||||
|
@ -24,7 +24,8 @@ Module attributes:
|
|||||||
between items.
|
between items.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import functools, math
|
import functools
|
||||||
|
import math
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QSize, QRect, QPoint, QTimer
|
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QSize, QRect, QPoint, QTimer
|
||||||
from PyQt5.QtWidgets import (QTabWidget, QTabBar, QSizePolicy, QCommonStyle,
|
from PyQt5.QtWidgets import (QTabWidget, QTabBar, QSizePolicy, QCommonStyle,
|
||||||
@ -296,7 +297,8 @@ class TabBar(QTabBar):
|
|||||||
"""Set the tab bar font."""
|
"""Set the tab bar font."""
|
||||||
self.setFont(config.get('fonts', 'tabbar'))
|
self.setFont(config.get('fonts', 'tabbar'))
|
||||||
|
|
||||||
def resizeEvent(self, s):
|
def resizeEvent(self, _s):
|
||||||
|
"""Set the favicon size to the tabbar size minus some padding."""
|
||||||
height = self.size().height()
|
height = self.size().height()
|
||||||
if height > 0:
|
if height > 0:
|
||||||
height = math.ceil(height - height / 7)
|
height = math.ceil(height - height / 7)
|
||||||
|
Loading…
Reference in New Issue
Block a user