Fix some typos

Thanks to https://github.com/crate-ci/typos
This commit is contained in:
Florian Bruhin 2024-07-02 13:40:15 +02:00
parent 5f50586ca4
commit a5c5cdb08b
8 changed files with 14 additions and 14 deletions

View File

@ -22,9 +22,9 @@ if TYPE_CHECKING:
JsValueType = Union[int, float, str, None]
if machinery.IS_QT6:
KeybordModifierType = Qt.KeyboardModifier
KeyboardModifierType = Qt.KeyboardModifier
else:
KeybordModifierType = Union[Qt.KeyboardModifiers, Qt.KeyboardModifier]
KeyboardModifierType = Union[Qt.KeyboardModifiers, Qt.KeyboardModifier]
class Error(Exception):
@ -336,7 +336,7 @@ class AbstractWebElement(collections.abc.MutableMapping): # type: ignore[type-a
log.webelem.debug("Sending fake click to {!r} at position {} with "
"target {}".format(self, pos, click_target))
target_modifiers: Dict[usertypes.ClickTarget, KeybordModifierType] = {
target_modifiers: Dict[usertypes.ClickTarget, KeyboardModifierType] = {
usertypes.ClickTarget.normal: Qt.KeyboardModifier.NoModifier,
usertypes.ClickTarget.window: Qt.KeyboardModifier.AltModifier | Qt.KeyboardModifier.ShiftModifier,
usertypes.ClickTarget.tab: Qt.KeyboardModifier.ControlModifier,

View File

@ -4,7 +4,7 @@
"""Completion view for statusbar command section.
Defines a CompletionView which uses CompletionFiterModel and CompletionModel
Defines a CompletionView which uses CompletionFilterModel and CompletionModel
subclasses to provide completions.
"""

View File

@ -75,7 +75,7 @@ class BlocklistDownloads(QObject):
if not self._in_progress and not self._finished:
# The in-progress list is empty but we still haven't called the
# completion callback yet. This happens when all downloads finish
# before we've set `_finished_registering_dowloads` to False.
# before we've set `_finished_registering_downloads` to False.
self._finished = True
self.all_downloads_finished.emit(self._done_count)

View File

@ -696,7 +696,7 @@ class TabBar(QTabBar):
# Re-do the text elision that the base QTabBar does, but using a text
# rectangle computed by out TabBarStyle. With Qt6 the base class ends
# up using QCommonStyle directly for that which has a different opinon
# up using QCommonStyle directly for that which has a different opinion
# of how vertical tabs should work.
text_rect = self._our_style.subElementRect(
QStyle.SubElement.SE_TabBarTabText,

View File

@ -175,7 +175,7 @@ def qt_version(qversion=None, qt_version_str=None):
def get_qt_version():
"""Get the Qt version, or None if too old for QLibaryInfo.version()."""
"""Get the Qt version, or None if too old for QLibraryInfo.version()."""
try:
from qutebrowser.qt.core import QLibraryInfo
return QLibraryInfo.version().normalized()

View File

@ -16,7 +16,7 @@ from qutebrowser.utils import qtlog, usertypes
class HTTPRequest(QNetworkRequest):
"""A QNetworkRquest that follows (secure) redirects by default."""
"""A QNetworkRequest that follows (secure) redirects by default."""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

View File

@ -224,7 +224,7 @@ class TestAdd:
assert list(web_history)
assert not list(web_history.completion)
def test_no_immedate_duplicates(self, web_history, mock_time):
def test_no_immediate_duplicates(self, web_history, mock_time):
url = QUrl("http://example.com")
url2 = QUrl("http://example2.com")
web_history.add_from_tab(QUrl(url), QUrl(url), 'title')

View File

@ -533,7 +533,7 @@ class TestIsEnum:
assert not utils.is_enum(23)
class SentinalException(Exception):
class SentinelException(Exception):
pass
@ -543,7 +543,7 @@ class TestRaises:
def do_raise(self):
"""Helper function which raises an exception."""
raise SentinalException
raise SentinelException
def do_nothing(self):
"""Helper function which does nothing."""
@ -562,15 +562,15 @@ class TestRaises:
def test_no_args_true(self):
"""Test with no args and an exception which gets raised."""
assert utils.raises(SentinalException, self.do_raise)
assert utils.raises(SentinelException, self.do_raise)
def test_no_args_false(self):
"""Test with no args and an exception which does not get raised."""
assert not utils.raises(SentinalException, self.do_nothing)
assert not utils.raises(SentinelException, self.do_nothing)
def test_unrelated_exception(self):
"""Test with an unrelated exception."""
with pytest.raises(SentinalException):
with pytest.raises(SentinelException):
utils.raises(ValueError, self.do_raise)