From f2aa4cad20084f709db2f8d32fd9178f04e574dd Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Thu, 21 Apr 2022 17:16:34 +0800 Subject: [PATCH] fix typos --- .typos.toml | 2 ++ docs/usage.rst | 4 ++-- nvchecker/httpclient/base.py | 4 ++-- nvchecker_source/apt.py | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .typos.toml diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..b22ff37 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +mis = "mis" diff --git a/docs/usage.rst b/docs/usage.rst index 9550aea..cb75668 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -701,7 +701,7 @@ repo subrepo Check the version in this subrepo. This field is optional. - When ommited all subrepos are queried. + When omitted all subrepos are queried. This source supports :ref:`list options`. @@ -731,7 +731,7 @@ repo Should be one of ``addon`` or ``package``. Packages in ``addon2-1.xml`` use ``addon`` and packages in ``repository2-1.xml`` use ``package``. channel - Choose the target channel from one of ``stable``, ``beta``, ``dev`` or ``canary``. This option also accepts a comma-seperated list to pick from multiple channels. For example, the latest unstable version is picked with ``beta,dev,canary``. The default is ``stable``. + Choose the target channel from one of ``stable``, ``beta``, ``dev`` or ``canary``. This option also accepts a comma-separated list to pick from multiple channels. For example, the latest unstable version is picked with ``beta,dev,canary``. The default is ``stable``. host_os Choose the target OS for the tracked package from one of ``linux``, ``macosx``, ``windows``. The default is ``linux``. For OS-independent packages (e.g., Java JARs), this field is ignored. diff --git a/nvchecker/httpclient/base.py b/nvchecker/httpclient/base.py index ae861f9..b343a6c 100644 --- a/nvchecker/httpclient/base.py +++ b/nvchecker/httpclient/base.py @@ -27,7 +27,7 @@ class Response: self.body = body def json(self): - '''Convert reponse content to JSON.''' + '''Convert response content to JSON.''' return _json.loads(self.body.decode('utf-8')) class BaseSession: @@ -95,7 +95,7 @@ class BaseSession: tries = i, exc_info = e) continue - raise Exception('shoud not reach') + raise Exception('should not reach') async def request_impl( self, url: str, *, diff --git a/nvchecker_source/apt.py b/nvchecker_source/apt.py index dddb634..8848c69 100644 --- a/nvchecker_source/apt.py +++ b/nvchecker_source/apt.py @@ -135,7 +135,7 @@ async def get_version( strip_release = conf.get('strip_release', False) if srcpkg and pkg: - raise GetVersionError('Setting both srcpkg and pkg is ambigious') + raise GetVersionError('Setting both srcpkg and pkg is ambiguous') elif not srcpkg and not pkg: pkg = name