diff --git a/qutebrowser/browser/webelem.py b/qutebrowser/browser/webelem.py index 721ab83df..556623ee5 100644 --- a/qutebrowser/browser/webelem.py +++ b/qutebrowser/browser/webelem.py @@ -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, diff --git a/qutebrowser/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py index 652ea636d..c7e549f46 100644 --- a/qutebrowser/completion/completionwidget.py +++ b/qutebrowser/completion/completionwidget.py @@ -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. """ diff --git a/qutebrowser/components/utils/blockutils.py b/qutebrowser/components/utils/blockutils.py index 369b0eee5..a65085949 100644 --- a/qutebrowser/components/utils/blockutils.py +++ b/qutebrowser/components/utils/blockutils.py @@ -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) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index afbfa0a95..6cc466c93 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -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, diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py index c008286e6..06de668b0 100644 --- a/qutebrowser/misc/earlyinit.py +++ b/qutebrowser/misc/earlyinit.py @@ -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() diff --git a/qutebrowser/misc/httpclient.py b/qutebrowser/misc/httpclient.py index 19186ffb7..a6a6025c3 100644 --- a/qutebrowser/misc/httpclient.py +++ b/qutebrowser/misc/httpclient.py @@ -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) diff --git a/tests/unit/browser/test_history.py b/tests/unit/browser/test_history.py index 7b35fa149..e46c685f4 100644 --- a/tests/unit/browser/test_history.py +++ b/tests/unit/browser/test_history.py @@ -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') diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index 77805c6dc..51255aa61 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -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)