From afcb018ee2df279a7069b64d66b3aee7cd91ec5a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 27 May 2016 12:07:00 +0200 Subject: [PATCH] Fix some spelling mistakes Found via http://jwilk.net/software/mwic --- CONTRIBUTING.asciidoc | 2 +- misc/userscripts/password_fill | 10 +++++----- qutebrowser/browser/downloads.py | 2 +- qutebrowser/browser/hints.py | 2 +- qutebrowser/browser/mhtml.py | 2 +- qutebrowser/commands/userscripts.py | 2 +- qutebrowser/html/no_pdfjs.html | 2 +- qutebrowser/mainwindow/statusbar/bar.py | 2 +- qutebrowser/utils/log.py | 2 +- tests/unit/browser/http/test_content_disposition.py | 2 +- tests/unit/browser/test_adblock.py | 2 +- tests/unit/browser/test_cache.py | 2 +- tests/unit/browser/test_mhtml.py | 2 +- tests/unit/misc/test_guiprocess.py | 2 +- tests/unit/misc/test_keyhints.py | 6 +++--- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CONTRIBUTING.asciidoc b/CONTRIBUTING.asciidoc index 6b279c51c..aa0322008 100644 --- a/CONTRIBUTING.asciidoc +++ b/CONTRIBUTING.asciidoc @@ -370,7 +370,7 @@ The following logging levels are available for every logger: [width="75%",cols="25%,75%"] |======================================================================= -|criticial |Critical issue, qutebrowser can't continue to run. +|critical |Critical issue, qutebrowser can't continue to run. |error |There was an issue and some kind of operation was abandoned. |warning |There was an issue but the operation can continue running. |info |General informational messages. diff --git a/misc/userscripts/password_fill b/misc/userscripts/password_fill index fba09c78e..0bbab8c3b 100755 --- a/misc/userscripts/password_fill +++ b/misc/userscripts/password_fill @@ -61,7 +61,7 @@ die() { } javascript_escape() { - # print the first argument in a escaped way, such that it can savely + # print the first argument in a escaped way, such that it can safely # be used within javascripts double quotes sed "s,[\\\'\"],\\\&,g" <<< "$1" } @@ -80,7 +80,7 @@ javascript_escape() { # between different paths on the same domain. simplify_url() { - simple_url="${1##*://}" # remove protocoll specification + simple_url="${1##*://}" # remove protocol specification simple_url="${simple_url%%\?*}" # remove GET parameters simple_url="${simple_url%%/*}" # remove directory path simple_url="${simple_url%:*}" # remove port @@ -106,7 +106,7 @@ simplify_url() { # fi # } -# Another beahviour is to drop another level of subdomains until search hits +# Another behaviour is to drop another level of subdomains until search hits # are found: no_entries_found() { while [ 0 -eq "${#files[@]}" ] && [ -n "$simple_url" ]; do @@ -170,7 +170,7 @@ choose_entry_random() { # dmenu or zenity or even qutebrowser completion in future?) which entry to # pick MENU_COMMAND=( head -n 1 ) -# whether to show the menu if there is only one entrie in it +# whether to show the menu if there is only one entry in it menu_if_one_entry=0 choose_entry_menu() { local nr=${#files[@]} @@ -245,7 +245,7 @@ pass_backend() { done < <(find -L "$PREFIX" -iname '*.gpg' -print0) fi if ((match_filename)) ; then - # add entries wth matching filepath + # add entries with matching filepath while read -r passfile ; do passfile="${passfile#$PREFIX}" passfile="${passfile#/}" diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index f1b66a2d1..2ea88bc28 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -534,7 +534,7 @@ class DownloadItem(QObject): self._filename = create_full_filename( self.basename, os.path.join(download_dir(), filename)) - # At this point, we have a misconfigured XDG_DOWNLOAd_DIR, as + # At this point, we have a misconfigured XDG_DOWNLOAD_DIR, as # download_dir() + filename is still no absolute path. # The config value is checked for "absoluteness", but # ~/.config/user-dirs.dirs may be misconfigured and a non-absolute path diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 69252f106..b28da90af 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -1056,7 +1056,7 @@ class WordHinter: self.dictionary = None def ensure_initialized(self): - """Generate the used words if yet uninialized.""" + """Generate the used words if yet uninitialized.""" dictionary = config.get("hints", "dictionary") if not self.words or self.dictionary != dictionary: self.words.clear() diff --git a/qutebrowser/browser/mhtml.py b/qutebrowser/browser/mhtml.py index 20d8b071d..24cc828f3 100644 --- a/qutebrowser/browser/mhtml.py +++ b/qutebrowser/browser/mhtml.py @@ -401,7 +401,7 @@ class _Downloader: """Callback when a download error occurred. Args: - url: The orignal url of the asset as QUrl. + url: The original url of the asset as QUrl. item: The DownloadItem given by the DownloadManager. """ try: diff --git a/qutebrowser/commands/userscripts.py b/qutebrowser/commands/userscripts.py index ef881cf91..41c1a9889 100644 --- a/qutebrowser/commands/userscripts.py +++ b/qutebrowser/commands/userscripts.py @@ -217,7 +217,7 @@ class _POSIXUserscriptRunner(_BaseUserscriptRunner): self._cleanup() def _cleanup(self): - """Clean up reader and temorary files.""" + """Clean up reader and temporary files.""" if self._cleaned_up: return log.procs.debug("Cleaning up") diff --git a/qutebrowser/html/no_pdfjs.html b/qutebrowser/html/no_pdfjs.html index 694affc4d..fa543c05b 100644 --- a/qutebrowser/html/no_pdfjs.html +++ b/qutebrowser/html/no_pdfjs.html @@ -35,7 +35,7 @@ body { } span.warning { - text-weigth: bold; + text-weight: bold; color: red; } diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py index 63da2f658..464c7117d 100644 --- a/qutebrowser/mainwindow/statusbar/bar.py +++ b/qutebrowser/mainwindow/statusbar/bar.py @@ -93,7 +93,7 @@ class StatusBar(QWidget): widget can adjust its size to it. arg: The new size. moved: Emitted when the statusbar has moved, so the completion widget - can move the the right position. + can move to the right position. arg: The new position. """ diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py index 072b63c05..bbf2827f2 100644 --- a/qutebrowser/utils/log.py +++ b/qutebrowser/utils/log.py @@ -439,7 +439,7 @@ class RAMHandler(logging.Handler): self._data.append(record) def dump_log(self, html=False, level='vdebug'): - """Dump the complete formatted log data as as string. + """Dump the complete formatted log data as string. FIXME: We should do all the HTML formatter via jinja2. (probably obsolete when moving to a widget for logging, diff --git a/tests/unit/browser/http/test_content_disposition.py b/tests/unit/browser/http/test_content_disposition.py index c845e3ef9..4b4d0b78c 100644 --- a/tests/unit/browser/http/test_content_disposition.py +++ b/tests/unit/browser/http/test_content_disposition.py @@ -33,7 +33,7 @@ class HeaderChecker: """Helper class with some convenience methods to check filenames. - Attrs: + Attributes: caplog: fixture from pytest-capturelog stubs: fixture that provides testing stubs """ diff --git a/tests/unit/browser/test_adblock.py b/tests/unit/browser/test_adblock.py index 9b92d5b36..368207c25 100644 --- a/tests/unit/browser/test_adblock.py +++ b/tests/unit/browser/test_adblock.py @@ -161,7 +161,7 @@ def create_blocklist(directory, blocked_hosts=BLOCKLIST_HOSTS, for host in blocked_hosts: blocklist.write(host + ' This is not a correct hosts file\n') else: - raise ValueError('Uncorrect line_format argument') + raise ValueError('Incorrect line_format argument') return str(blocklist_file) diff --git a/tests/unit/browser/test_cache.py b/tests/unit/browser/test_cache.py index cb570972b..6d9254d16 100644 --- a/tests/unit/browser/test_cache.py +++ b/tests/unit/browser/test_cache.py @@ -99,7 +99,7 @@ def test_cache_size_leq_max_cache_size(config_stub, tmpdir): preload_cache(disk_cache, 'http://foo.xxx') preload_cache(disk_cache, 'http://bar.net') assert disk_cache.expire() < limit - # Add a threshold to the limit due to unforseeable Qt internals + # Add a threshold to the limit due to unforeseeable Qt internals assert disk_cache.cacheSize() < limit + 100 diff --git a/tests/unit/browser/test_mhtml.py b/tests/unit/browser/test_mhtml.py index 82973c1ac..6cf597a4b 100644 --- a/tests/unit/browser/test_mhtml.py +++ b/tests/unit/browser/test_mhtml.py @@ -37,7 +37,7 @@ class Checker: """A helper to check mhtml output. - Attrs: + Attributes: fp: A BytesIO object for passing to MHTMLWriter.write_to. """ diff --git a/tests/unit/misc/test_guiprocess.py b/tests/unit/misc/test_guiprocess.py index 9aa7f99d5..255458812 100644 --- a/tests/unit/misc/test_guiprocess.py +++ b/tests/unit/misc/test_guiprocess.py @@ -209,7 +209,7 @@ def test_exit_unsuccessful_output(qtbot, proc, caplog, py_proc, stream): @pytest.mark.parametrize('stream', ['stdout', 'stderr']) def test_exit_successful_output(qtbot, proc, py_proc, stream): - """When a process suceeds, no output should be logged. + """When a process succeeds, no output should be logged. The test doesn't actually check the log as it'd fail because of the error logging. diff --git a/tests/unit/misc/test_keyhints.py b/tests/unit/misc/test_keyhints.py index 75f2c5ebf..4718547a2 100644 --- a/tests/unit/misc/test_keyhints.py +++ b/tests/unit/misc/test_keyhints.py @@ -81,7 +81,7 @@ def test_suggestions(keyhint, key_config_stub): def test_special_bindings(keyhint, key_config_stub): - """Ensure the a prefix of '<' doesn't suggest special keys.""" + """Ensure a prefix of '<' doesn't suggest special keys.""" # we want the dict to return sorted items() for reliable testing key_config_stub.set_bindings_for('normal', OrderedDict([ ('