Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Jul 2, 2024
1 parent 5f50586 commit a5c5cdb
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions qutebrowser/browser/webelem.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
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):
Expand Down Expand Up @@ -336,7 +336,7 @@ def _click_fake_event(self, click_target: usertypes.ClickTarget,
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,
Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/completion/completionwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/components/utils/blockutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def initiate(self) -> None:
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)

Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/mainwindow/tabwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ def initStyleOption(self, opt, idx):

# 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,
Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/misc/earlyinit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/misc/httpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


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)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/browser/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_exclude(self, web_history, config_stub):
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')
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def test_object(self):
assert not utils.is_enum(23)


class SentinalException(Exception):
class SentinelException(Exception):
pass


Expand All @@ -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."""
Expand All @@ -562,15 +562,15 @@ def test_raises_int(self, exception, value, expected):

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)


Expand Down

0 comments on commit a5c5cdb

Please sign in to comment.