From d229e907243c219f2deffb299bca0deb35a99ea4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 4 Oct 2015 15:41:42 +0200 Subject: [PATCH] Fix some splelling mistakes. --- FAQ.asciidoc | 4 ++-- doc/help/settings.asciidoc | 4 ++-- qutebrowser/app.py | 4 ++-- qutebrowser/browser/signalfilter.py | 2 +- qutebrowser/browser/tabhistory.py | 2 +- qutebrowser/commands/argparser.py | 2 +- qutebrowser/commands/runners.py | 2 +- qutebrowser/completion/completer.py | 4 ++-- qutebrowser/config/configdata.py | 2 +- qutebrowser/config/configtypes.py | 4 ++-- qutebrowser/config/parsers/keyconf.py | 2 +- qutebrowser/mainwindow/statusbar/prompter.py | 2 +- qutebrowser/mainwindow/tabwidget.py | 2 +- qutebrowser/misc/autoupdate.py | 2 +- qutebrowser/misc/crashdialog.py | 4 ++-- qutebrowser/misc/httpclient.py | 2 +- qutebrowser/misc/ipc.py | 2 +- qutebrowser/utils/message.py | 8 ++++---- qutebrowser/utils/qtutils.py | 2 +- qutebrowser/utils/usertypes.py | 6 +++--- scripts/dev/misc_checks.py | 5 ++++- tests/unit/mainwindow/statusbar/test_textbase.py | 2 +- tests/unit/misc/test_autoupdate.py | 2 +- tests/unit/misc/test_ipc.py | 4 ++-- tests/unit/misc/test_sessions.py | 2 +- tests/unit/utils/overflow_test_cases.py | 2 +- tests/unit/utils/test_standarddir.py | 2 +- tests/unit/utils/test_urlutils.py | 2 +- tests/unit/utils/test_version.py | 2 +- 29 files changed, 44 insertions(+), 41 deletions(-) diff --git a/FAQ.asciidoc b/FAQ.asciidoc index a3ba96e8f..075d3f345 100644 --- a/FAQ.asciidoc +++ b/FAQ.asciidoc @@ -60,7 +60,7 @@ Why Python?:: But isn't Python too slow for a browser?:: http://www.infoworld.com/d/application-development/van-rossum-python-not-too-slow-188715[No.] - I believe efficency while coding is a lot more important than efficency + I believe efficiency while coding is a lot more important than efficiency while running. Also, most of the heavy lifting of qutebrowser is done by Qt and WebKit in C++, with the https://wiki.python.org/moin/GlobalInterpreterLock[GIL] released. @@ -103,7 +103,7 @@ Unable to view flash content.:: Experiencing freezing on sites like duckduckgo and youtube.:: This issue could be caused by stale plugin files installed by `mozplugger` if mozplugger was subsequently removed. - Try exiting qutebroser and removing `~/.mozilla/plugins/mozplugger*.so`. + Try exiting qutebrowser and removing `~/.mozilla/plugins/mozplugger*.so`. See https://github.com/The-Compiler/qutebrowser/issues/357[Issue #357] for more details. diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index ba7a828c3..670c3738a 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -171,7 +171,7 @@ |<>|Opacity for hints. |<>|Mode to use for hints. |<>|Chars used for hint strings. -|<>|Mininum number of chars used for hint strings. +|<>|Minimum number of chars used for hint strings. |<>|Whether to scatter hint key chains (like Vimium) or not (like dwb). |<>|Make chars in hint strings uppercase. |<>|Whether to auto-follow a hint if there's only one left. @@ -1494,7 +1494,7 @@ Default: +pass:[asdfghjkl]+ [[hints-min-chars]] === min-chars -Mininum number of chars used for hint strings. +Minimum number of chars used for hint strings. Default: +pass:[1]+ diff --git a/qutebrowser/app.py b/qutebrowser/app.py index a94918eaf..cf4398289 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -58,7 +58,7 @@ qApp = None def run(args): - """Initialize everthing and run the application.""" + """Initialize everything and run the application.""" # pylint: disable=too-many-statements if args.version: print(version.version(short=True)) @@ -661,7 +661,7 @@ class Quitter: if self._args.temp_basedir: atexit.register(shutil.rmtree, self._args.basedir) # If we don't kill our custom handler here we might get segfaults - log.destroy.debug("Deactiving message handler...") + log.destroy.debug("Deactivating message handler...") qInstallMessageHandler(None) # Now we can hopefully quit without segfaults log.destroy.debug("Deferring QApplication::exit...") diff --git a/qutebrowser/browser/signalfilter.py b/qutebrowser/browser/signalfilter.py index 957dc8acb..2444a57b6 100644 --- a/qutebrowser/browser/signalfilter.py +++ b/qutebrowser/browser/signalfilter.py @@ -55,7 +55,7 @@ class SignalFilter(QObject): tab: The WebView to create filters for. Return: - A partial functon calling _filter_signals with a signal. + A partial function calling _filter_signals with a signal. """ return functools.partial(self._filter_signals, signal, tab) diff --git a/qutebrowser/browser/tabhistory.py b/qutebrowser/browser/tabhistory.py index 12464b561..def7857b6 100644 --- a/qutebrowser/browser/tabhistory.py +++ b/qutebrowser/browser/tabhistory.py @@ -138,7 +138,7 @@ def serialize(items): Return: A (stream, data, user_data) tuple. - stream: The reseted QDataStream. + stream: The reset QDataStream. data: The QByteArray with the raw data. user_data: A list with each item's user data. diff --git a/qutebrowser/commands/argparser.py b/qutebrowser/commands/argparser.py index 902d8bd48..a5ad7496b 100644 --- a/qutebrowser/commands/argparser.py +++ b/qutebrowser/commands/argparser.py @@ -38,7 +38,7 @@ class ArgumentParserError(Exception): class ArgumentParserExit(Exception): - """Exception raised when the argument parser exitted. + """Exception raised when the argument parser exited. Attributes: status: The exit status. diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py index b3c3863fb..f0f23fe5a 100644 --- a/qutebrowser/commands/runners.py +++ b/qutebrowser/commands/runners.py @@ -172,7 +172,7 @@ class CommandRunner(QObject): keep: Whether to keep special chars and whitespace Return: - A list containing the splitted strings. + A list containing the split strings. """ if not argstr: return [] diff --git a/qutebrowser/completion/completer.py b/qutebrowser/completion/completer.py index 7dc66816b..08ffd6862 100644 --- a/qutebrowser/completion/completer.py +++ b/qutebrowser/completion/completer.py @@ -124,7 +124,7 @@ class Completer(QObject): self.update_completion() def _model(self): - """Convienience method to get the current completion model.""" + """Convenience method to get the current completion model.""" completion = objreg.get('completion', scope='window', window=self._win_id) return completion.model() @@ -254,7 +254,7 @@ class Completer(QObject): Args: selected: New selection. - _delected: Previous selection. + _deselected: Previous selection. """ indexes = selected.indexes() if not indexes: diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index ba63e02be..2de05e247 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -773,7 +773,7 @@ def data(readonly=False): ('min-chars', SettingValue(typ.Int(minval=1), '1'), - "Mininum number of chars used for hint strings."), + "Minimum number of chars used for hint strings."), ('scatter', SettingValue(typ.Bool(), 'true'), diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 5cfae02d8..ec34c3009 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -573,8 +573,8 @@ class Command(BaseType): self._basic_validation(value) if not value: return - splitted = value.split() - if not splitted or splitted[0] not in cmdutils.cmd_dict: + split = value.split() + if not split or split[0] not in cmdutils.cmd_dict: raise configexc.ValidationError(value, "must be a valid command!") def complete(self): diff --git a/qutebrowser/config/parsers/keyconf.py b/qutebrowser/config/parsers/keyconf.py index 21788cb09..788ee27af 100644 --- a/qutebrowser/config/parsers/keyconf.py +++ b/qutebrowser/config/parsers/keyconf.py @@ -81,7 +81,7 @@ class KeyConfigParser(QObject): Args: configdir: The directory to save the configs in. fname: The filename of the config. - relaxed: If given, unknwon commands are ignored. + relaxed: If given, unknown commands are ignored. """ super().__init__(parent) self.is_dirty = False diff --git a/qutebrowser/mainwindow/statusbar/prompter.py b/qutebrowser/mainwindow/statusbar/prompter.py index 53831e37c..e97b4d374 100644 --- a/qutebrowser/mainwindow/statusbar/prompter.py +++ b/qutebrowser/mainwindow/statusbar/prompter.py @@ -289,7 +289,7 @@ class Prompter(QObject): @pyqtSlot(usertypes.Question, bool) def ask_question(self, question, blocking): - """Dispkay a question in the statusbar. + """Display a question in the statusbar. Args: question: The Question object to ask. diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index c000d7342..3b18316be 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -309,7 +309,7 @@ class TabBar(QTabBar): def refresh(self): """Properly repaint the tab bar and relayout tabs.""" - # This is a horrible hack, but we need to do this so the underlaying Qt + # This is a horrible hack, but we need to do this so the underlying Qt # code sets layoutDirty so it actually relayouts the tabs. self.setIconSize(self.iconSize()) diff --git a/qutebrowser/misc/autoupdate.py b/qutebrowser/misc/autoupdate.py index 2126a1296..22032750a 100644 --- a/qutebrowser/misc/autoupdate.py +++ b/qutebrowser/misc/autoupdate.py @@ -84,6 +84,6 @@ class PyPIVersionClient(QObject): try: self.success.emit(json_data['info']['version']) except KeyError as e: - self.error.emit("Malformed data recieved in reply " + self.error.emit("Malformed data received in reply " "({!r} not found)!".format(e)) return diff --git a/qutebrowser/misc/crashdialog.py b/qutebrowser/misc/crashdialog.py index 515435666..c64f5aeda 100644 --- a/qutebrowser/misc/crashdialog.py +++ b/qutebrowser/misc/crashdialog.py @@ -87,14 +87,14 @@ def get_fatal_crash_dialog(debug, data): text = ("qutebrowser was restarted after a fatal crash!
" "Unfortunately, this crash occurred in Qt (the library " "qutebrowser uses), and your version ({}) is outdated - " - "Qt 5.4 or later is recommended. Unfortuntately Debian and " + "Qt 5.4 or later is recommended. Unfortunately Debian and " "Ubuntu don't ship a newer version (yet?)...".format( qVersion())) return QMessageBox(QMessageBox.Critical, title, text, QMessageBox.Ok) def _get_environment_vars(): - """Gather enveronment variables for the crash info.""" + """Gather environment variables for the crash info.""" masks = ('DESKTOP_SESSION', 'DE', 'QT_*', 'PYTHON*', 'LC_*', 'LANG') info = [] for key, value in os.environ.items(): diff --git a/qutebrowser/misc/httpclient.py b/qutebrowser/misc/httpclient.py index 8513984ef..4a5f9ccf8 100644 --- a/qutebrowser/misc/httpclient.py +++ b/qutebrowser/misc/httpclient.py @@ -40,7 +40,7 @@ class HTTPClient(QObject): Signals: success: Emitted when the operation succeeded. - arg: The recieved data. + arg: The received data. error: Emitted when the request failed. arg: The error message, as string. """ diff --git a/qutebrowser/misc/ipc.py b/qutebrowser/misc/ipc.py index b85ad4aff..9271c4593 100644 --- a/qutebrowser/misc/ipc.py +++ b/qutebrowser/misc/ipc.py @@ -143,7 +143,7 @@ class IPCServer(QObject): _socketname: The socketname to use. _socketopts_ok: Set if using setSocketOptions is working with this OS/Qt version. - _atime_timer: Timer to update the atime of the socket regularily. + _atime_timer: Timer to update the atime of the socket regularly. Signals: got_args: Emitted when there was an IPC connection and arguments were diff --git a/qutebrowser/utils/message.py b/qutebrowser/utils/message.py index 26bd75bb4..b8bf5859a 100644 --- a/qutebrowser/utils/message.py +++ b/qutebrowser/utils/message.py @@ -112,7 +112,7 @@ def on_focus_changed(): def error(win_id, message, immediately=False): - """Convienience function to display an error message in the statusbar. + """Convenience function to display an error message in the statusbar. Args: win_id: The ID of the window which is calling this function. @@ -122,7 +122,7 @@ def error(win_id, message, immediately=False): def warning(win_id, message, immediately=False): - """Convienience function to display a warning message in the statusbar. + """Convenience function to display a warning message in the statusbar. Args: win_id: The ID of the window which is calling this function. @@ -132,7 +132,7 @@ def warning(win_id, message, immediately=False): def info(win_id, message, immediately=True): - """Convienience function to display an info message in the statusbar. + """Convenience function to display an info message in the statusbar. Args: win_id: The ID of the window which is calling this function. @@ -142,7 +142,7 @@ def info(win_id, message, immediately=True): def set_cmd_text(win_id, txt): - """Convienience function to Set the statusbar command line to a text.""" + """Convenience function to Set the statusbar command line to a text.""" _wrapper(win_id, 'set_cmd_text', txt) diff --git a/qutebrowser/utils/qtutils.py b/qutebrowser/utils/qtutils.py index b4aa28698..b504b1803 100644 --- a/qutebrowser/utils/qtutils.py +++ b/qutebrowser/utils/qtutils.py @@ -89,7 +89,7 @@ def check_overflow(arg, ctype, fatal=True): Args: arg: The argument to check ctype: The C/Qt type to check as a string. - fatal: Wether to raise exceptions (True) or truncate values (False) + fatal: Whether to raise exceptions (True) or truncate values (False) Return The truncated argument if fatal=False diff --git a/qutebrowser/utils/usertypes.py b/qutebrowser/utils/usertypes.py index a8b33e9c9..5f4f84443 100644 --- a/qutebrowser/utils/usertypes.py +++ b/qutebrowser/utils/usertypes.py @@ -271,11 +271,11 @@ class Question(QObject): answered: Emitted when the question has been answered by the user. arg: The answer to the question. cancelled: Emitted when the question has been cancelled by the user. - aborted: Emitted when the question was aborted programatically. + aborted: Emitted when the question was aborted programmatically. In this case, cancelled is not emitted. - answered_yes: Convienience signal emitted when a yesno question was + answered_yes: Convenience signal emitted when a yesno question was answered with yes. - answered_no: Convienience signal emitted when a yesno question was + answered_no: Convenience signal emitted when a yesno question was answered with no. completed: Emitted when the question was completed in any way. """ diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py index baf7c4877..f57ff5c1d 100644 --- a/scripts/dev/misc_checks.py +++ b/scripts/dev/misc_checks.py @@ -84,7 +84,10 @@ def check_spelling(): '[Oo]ccur[^r .]', '[Ss]eperator', '[Ee]xplicitely', '[Rr]esetted', '[Aa]uxillary', '[Aa]ccidentaly', '[Aa]mbigious', '[Ll]oosly', '[Ii]nitialis', '[Cc]onvienence', '[Ss]imiliar', '[Uu]ncommited', - '[Rr]eproducable', '[Aa]n [Uu]ser'} + '[Rr]eproducable', '[Aa]n [Uu]ser', '[Cc]onvienience', + '[Ww]ether', '[Pp]rogramatically', '[Ss]plitted', '[Ee]xitted', + '[Mm]ininum', '[Rr]esett?ed', '[Rr]ecieved', '[Rr]egularily', + '[Uu]nderlaying', '[Ii]nexistant', '[Ee]lipsis'} # Words which look better when splitted, but might need some fine tuning. words |= {'[Ww]ebelements', '[Mm]ouseevent', '[Kk]eysequence', diff --git a/tests/unit/mainwindow/statusbar/test_textbase.py b/tests/unit/mainwindow/statusbar/test_textbase.py index 016d02aad..ddb8112cd 100644 --- a/tests/unit/mainwindow/statusbar/test_textbase.py +++ b/tests/unit/mainwindow/statusbar/test_textbase.py @@ -42,7 +42,7 @@ def test_elided_text(qtbot, elidemode, check): qtbot: pytestqt.plugin.QtBot fixture elidemode: parametrized elide mode check: function that receives the elided text and must return True - if the elipsis is placed correctly according to elidemode. + if the ellipsis is placed correctly according to elidemode. """ label = TextBase(elidemode=elidemode) qtbot.add_widget(label) diff --git a/tests/unit/misc/test_autoupdate.py b/tests/unit/misc/test_autoupdate.py index f03db7bec..f05977426 100644 --- a/tests/unit/misc/test_autoupdate.py +++ b/tests/unit/misc/test_autoupdate.py @@ -33,7 +33,7 @@ class HTTPGetStub(httpclient.HTTPClient): Attributes: url: the last url used by get() - _success: Wether get() will emit a success signal. + _success: Whether get() will emit a success signal. """ def __init__(self, success=True, json=None): diff --git a/tests/unit/misc/test_ipc.py b/tests/unit/misc/test_ipc.py index a01fefc89..277ad4407 100644 --- a/tests/unit/misc/test_ipc.py +++ b/tests/unit/misc/test_ipc.py @@ -862,8 +862,8 @@ def test_long_username(monkeypatch): server.shutdown() -def test_connect_inexistant(qlocalsocket): - """Make sure connecting to an inexistant server fails immediately. +def test_connect_inexistent(qlocalsocket): + """Make sure connecting to an inexistent server fails immediately. If this test fails, our connection logic checking for the old naming scheme would not work properly. diff --git a/tests/unit/misc/test_sessions.py b/tests/unit/misc/test_sessions.py index 196569d4e..76134dca0 100644 --- a/tests/unit/misc/test_sessions.py +++ b/tests/unit/misc/test_sessions.py @@ -97,7 +97,7 @@ class TestExists: assert man.exists(name) @pytest.mark.parametrize('absolute', [True, False]) - def test_inexistant(self, tmpdir, absolute): + def test_inexistent(self, tmpdir, absolute): man = sessions.SessionManager(str(tmpdir)) if absolute: diff --git a/tests/unit/utils/overflow_test_cases.py b/tests/unit/utils/overflow_test_cases.py index 08e6ae7a8..82abf6221 100644 --- a/tests/unit/utils/overflow_test_cases.py +++ b/tests/unit/utils/overflow_test_cases.py @@ -62,7 +62,7 @@ def iter_good_values(): def iter_bad_values(): """Yield pairs of "bad" (C type, value, repl) tuples. - Theose should not pass overflow checking. The third value is the value they + These should not pass overflow checking. The third value is the value they should be replaced with if overflow checking should not be fatal. """ for ctype, values in BAD_VALUES.items(): diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py index cab4daa1e..4a82f6a42 100644 --- a/tests/unit/utils/test_standarddir.py +++ b/tests/unit/utils/test_standarddir.py @@ -272,7 +272,7 @@ class TestInitCacheDirTag: class TestCreatingDir: - """Make sure inexistant directories are created properly.""" + """Make sure inexistent directories are created properly.""" DIR_TYPES = ['config', 'data', 'cache', 'download', 'runtime'] diff --git a/tests/unit/utils/test_urlutils.py b/tests/unit/utils/test_urlutils.py index f3d8e13d2..f216c9bbb 100644 --- a/tests/unit/utils/test_urlutils.py +++ b/tests/unit/utils/test_urlutils.py @@ -39,7 +39,7 @@ class FakeDNS: Attributes: used: Whether the fake DNS server was used since it was - created/reseted. + created/reset. answer: What to return for the given host(True/False). Needs to be set when fromname_mock is called. """ diff --git a/tests/unit/utils/test_version.py b/tests/unit/utils/test_version.py index fe4534bce..8502c6878 100644 --- a/tests/unit/utils/test_version.py +++ b/tests/unit/utils/test_version.py @@ -543,7 +543,7 @@ class FakeQSslSocket: def sslLibraryVersionString(self): """Fake for QSslSocket::sslLibraryVersionString().""" if self._version is None: - raise AssertionError("Got valled with version None!") + raise AssertionError("Got called with version None!") return self._version