From a67829eea64a6737546b1c51d1d68c5db34f7cbd Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 23 May 2022 16:49:18 +0800 Subject: [PATCH] chore: Fix typos (#431) --- README.rst | 6 +++--- pypiserver/bottle.py | 4 ++-- pypiserver/config.py | 2 +- tests/test_app.py | 2 +- tests/test_config.py | 4 ++-- tests/test_main.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 306c32b..3326e52 100644 --- a/README.rst +++ b/README.rst @@ -234,7 +234,7 @@ or by adding the following lines to ``~/.pip/pip.conf``:: .. Note:: If you have installed ``pypiserver`` on a remote url without *https* - you wil receive an "untrusted" warning from *pip*, urging you to append + you will receive an "untrusted" warning from *pip*, urging you to append the ``--trusted-host`` option. You can also include this option permanently in your configuration-files or environment variables. @@ -282,7 +282,7 @@ In that case, ``pypiserver`` is responsible for authenticating the upload-reques http://serverfault.com/questions/152950/how-to-create-and-edit-htaccess-and-htpasswd-locally-on-my-computer-and-then-u or if you have bogus passwords that you don't care because they are for - an internal service (which is still "bad", from a security prespective...) + an internal service (which is still "bad", from a security perspective...) you may use this public service: http://www.htaccesstools.com/htpasswd-generator/ @@ -399,7 +399,7 @@ previous versions of ``pypiserver`` already exist, and (optionally) uninstall th # VERSION-CHECK: Fails if not installed. pypi-server --version - # UNINSTALL: Invoke again untill it fails. + # UNINSTALL: Invoke again until it fails. pip uninstall pypiserver Installing the Very Latest Version diff --git a/pypiserver/bottle.py b/pypiserver/bottle.py index 4d3271b..62a5df1 100644 --- a/pypiserver/bottle.py +++ b/pypiserver/bottle.py @@ -1752,7 +1752,7 @@ class JSONPlugin(object): if isinstance(rv, dict): #Attempt to serialize, raises exception on failure json_response = dumps(rv) - #Set content type only if serialization succesful + #Set content type only if serialization successful response.content_type = 'application/json' return json_response elif isinstance(rv, HTTPResponse) and isinstance(rv.body, dict): @@ -2327,7 +2327,7 @@ class ResourceManager(object): ''' Search for a resource and return an absolute file path, or `None`. The :attr:`path` list is searched in order. The first match is - returend. Symlinks are followed. The result is cached to speed up + returned. Symlinks are followed. The result is cached to speed up future lookups. ''' if name not in self.cache or DEBUG: for path in self.path: diff --git a/pypiserver/config.py b/pypiserver/config.py index f06126c..c626fec 100644 --- a/pypiserver/config.py +++ b/pypiserver/config.py @@ -879,7 +879,7 @@ class Config: def _adjust_old_args(args: t.Sequence[str]) -> t.List[str]: """Adjust args for backwards compatibility. - Should only be called once args have been verified to be unparseable. + Should only be called once args have been verified to be unparsable. """ # Backwards compatibility hack: for most of pypiserver's life, "run" # and "update" were not separate subcommands. The `-U` flag being diff --git a/tests/test_app.py b/tests/test_app.py index 3e05b5a..2f682b5 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -578,7 +578,7 @@ def test_search(root, testapp, search_xml, pkgs, matches): expected name and version matches for a search for the "test" package as specified by the search_xml fixture. - :param root: root temporry directory fixture; used as packages dir + :param root: root temporary directory fixture; used as packages dir for testapp :param testapp: webtest TestApp :param str search_xml: XML string roughly equivalent to a pip search diff --git a/tests/test_config.py b/tests/test_config.py index 334338e..7787b55 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -563,7 +563,7 @@ _CONFIG_TEST_PARAMS: t.Tuple[ConfigTestCase, ...] = ( # ****************************************************************** # Update subcommand args # ****************************************************************** - # exeucte + # execute ConfigTestCase( case="Update: execute not specified", args=["update"], @@ -735,7 +735,7 @@ def test_config_error( """Validate error cases.""" with pytest.raises(SystemExit): Config.from_args(args) - # Unfortunatley the error text is printed before the SystemExit is + # Unfortunately the error text is printed before the SystemExit is # raised, rather than being raised _with_ the systemexit, so we # need to capture stderr and check it for our expected text, if # any was specified in the test case. diff --git a/tests/test_main.py b/tests/test_main.py index 3d10f83..96a6815 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -278,7 +278,7 @@ def test_auto_servers() -> None: # adapters are defined in the AutoServer our_check_order = tuple(i[0] for i in __main__.AUTO_SERVER_IMPORTS) - # Some of the servers have more than one check, so we need to rmeove + # Some of the servers have more than one check, so we need to remove # duplicates before we check for identity with the AutoServer definition. seen: t.Dict[__main__.AutoServer, __main__.AutoServer] = {} our_check_order = tuple(