From 71839eb5fa4bd4962b261556b3bc574b91c5f530 Mon Sep 17 00:00:00 2001 From: Rajesh Tailor Date: Mon, 20 Nov 2023 18:03:42 +0530 Subject: [PATCH] [codespell] fix typos in doc,tests and help messages Change-Id: I4823782daa1af3872bc22603147e3073152cc777 --- openstackclient/compute/v2/server.py | 2 +- openstackclient/identity/v3/policy.py | 4 +++- openstackclient/network/v2/ndp_proxy.py | 10 +++++++--- openstackclient/tests/functional/base.py | 2 +- openstackclient/tests/unit/image/v1/fakes.py | 2 +- openstackclient/volume/v2/volume_type.py | 6 +++--- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index 4854e91f8..b3dbddb9e 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -2751,7 +2751,7 @@ class ListServer(command.Lister): try: # some deployments can have *loads* of images so we only # want to list the ones we care about. It would be better - # to only retrun the *fields* we care about (name) but + # to only return the *fields* we care about (name) but # glance doesn't support that # NOTE(stephenfin): This could result in super long URLs # but it seems unlikely to cause issues. Apache supports diff --git a/openstackclient/identity/v3/policy.py b/openstackclient/identity/v3/policy.py index 2504a467f..c6642768b 100644 --- a/openstackclient/identity/v3/policy.py +++ b/openstackclient/identity/v3/policy.py @@ -92,7 +92,9 @@ class DeletePolicy(command.Command): if result > 0: total = len(parsed_args.policy) - msg = _("%(result)s of %(total)s policys failed " "to delete.") % { + msg = _( + "%(result)s of %(total)s policies failed " "to delete." + ) % { 'result': result, 'total': total, } diff --git a/openstackclient/network/v2/ndp_proxy.py b/openstackclient/network/v2/ndp_proxy.py index 8699d2fbd..3b6caab66 100644 --- a/openstackclient/network/v2/ndp_proxy.py +++ b/openstackclient/network/v2/ndp_proxy.py @@ -129,7 +129,7 @@ class DeleteNDPProxy(command.Command): if result > 0: total = len(parsed_args.ndp_proxy) msg = _( - "%(result)s of %(total)s NDP Proxy failed " "to delete." + "%(result)s of %(total)s NDP proxies failed " "to delete." ) % {'result': result, 'total': total} raise exceptions.CommandError(msg) @@ -142,12 +142,16 @@ class ListNDPProxy(command.Lister): parser.add_argument( '--router', metavar='', - help=_("List only NDP proxies belong to this router (name or ID)"), + help=_( + "List only NDP proxies belonging to this router (name or ID)" + ), ) parser.add_argument( '--port', metavar='', - help=_("List only NDP proxies assocate to this port (name or ID)"), + help=_( + "List only NDP proxies associated to this port (name or ID)" + ), ) parser.add_argument( '--ip-address', diff --git a/openstackclient/tests/functional/base.py b/openstackclient/tests/functional/base.py index 86fca8fe8..adf42b35b 100644 --- a/openstackclient/tests/functional/base.py +++ b/openstackclient/tests/functional/base.py @@ -65,7 +65,7 @@ class TestCase(testtools.TestCase): :param cloud: The cloud to execute against. This can be a string, empty string, or None. A string results in '--os-auth-type $cloud', an empty string results in the '--os-auth-type' option being - omitted, and None resuts in '--os-auth-type none' for legacy + omitted, and None results in '--os-auth-type none' for legacy reasons. :param fail_ok: If failure is permitted. If False (default), a command failure will result in `~tempest.lib.exceptions.CommandFailed` diff --git a/openstackclient/tests/unit/image/v1/fakes.py b/openstackclient/tests/unit/image/v1/fakes.py index 67ebc000f..44845fb82 100644 --- a/openstackclient/tests/unit/image/v1/fakes.py +++ b/openstackclient/tests/unit/image/v1/fakes.py @@ -46,7 +46,7 @@ def create_one_image(attrs=None): """Create a fake image. :param Dictionary attrs: - A dictionary with all attrbutes of image + A dictionary with all attributes of image :return: A FakeResource object with id, name, owner, protected, visibility and tags attrs diff --git a/openstackclient/volume/v2/volume_type.py b/openstackclient/volume/v2/volume_type.py index f865c8247..00821178c 100644 --- a/openstackclient/volume/v2/volume_type.py +++ b/openstackclient/volume/v2/volume_type.py @@ -183,7 +183,7 @@ class CreateVolumeType(command.ShowOne): help=_( "Set an availability zone for this volume type " "(this is an alias for '--property RESKEY:availability_zones:') " # noqa: E501 - "(repeat option to set multiple availabilty zones)" + "(repeat option to set multiple availability zones)" ), ) parser.add_argument( @@ -459,7 +459,7 @@ class ListVolumeType(command.Lister): help=_( "List only volume types with this availability configured " "(this is an alias for '--property RESKEY:availability_zones:') " # noqa: E501 - "(repeat option to filter on multiple availabilty zones)" + "(repeat option to filter on multiple availability zones)" ), ) return parser @@ -628,7 +628,7 @@ class SetVolumeType(command.Command): help=_( "Set an availability zone for this volume type " "(this is an alias for '--property RESKEY:availability_zones:') " # noqa: E501 - "(repeat option to set multiple availabilty zones)" + "(repeat option to set multiple availability zones)" ), ) parser.add_argument(