From d56111cb07f19fb23979921199d6961c130d22b3 Mon Sep 17 00:00:00 2001 From: Sushil Kumar Date: Fri, 10 Jan 2014 11:22:12 +0000 Subject: [PATCH] Fixed misspellings of common words Fixed misspelling of common words found by the 'misspellings' tool. Change-Id: I8e03379f92b62fd4856bbc74b7e4641226a403d3 Closes-Bug: #1257531 --- troveclient/compat/cli.py | 2 +- troveclient/compat/common.py | 4 ++-- troveclient/compat/tests/test_auth.py | 8 ++++---- troveclient/compat/xml.py | 2 +- troveclient/exceptions.py | 2 +- troveclient/shell.py | 2 +- troveclient/utils.py | 2 +- troveclient/v1/root.py | 2 +- troveclient/v1/shell.py | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/troveclient/compat/cli.py b/troveclient/compat/cli.py index 892f8b88..54c92213 100644 --- a/troveclient/compat/cli.py +++ b/troveclient/compat/cli.py @@ -35,7 +35,7 @@ from troveclient.compat import common class InstanceCommands(common.AuthedCommandsBase): - """Commands to perform various instances operations and actions""" + """Commands to perform various instance operations and actions""" params = [ 'flavor', diff --git a/troveclient/compat/common.py b/troveclient/compat/common.py index 0cfbd9e9..11853c39 100644 --- a/troveclient/compat/common.py +++ b/troveclient/compat/common.py @@ -365,7 +365,7 @@ class Auth(CommandsBase): self.token = self.dbaas.client.auth_token self.service_url = self.dbaas.client.service_url CliOptions.save_from_instance_fields(self) - print("Token aquired! Saving to %s..." % CliOptions.APITOKEN) + print("Token acquired! Saving to %s..." % CliOptions.APITOKEN) print(" service_url = %s" % self.service_url) print(" token = %s" % self.token) except Exception: @@ -375,7 +375,7 @@ class Auth(CommandsBase): class AuthedCommandsBase(CommandsBase): - """Commands that work only with an authicated client.""" + """Commands that work only with an authenticated client.""" def __init__(self, parser): """Makes sure a token is available somehow and logs in.""" diff --git a/troveclient/compat/tests/test_auth.py b/troveclient/compat/tests/test_auth.py index 582e000b..b9ff1051 100644 --- a/troveclient/compat/tests/test_auth.py +++ b/troveclient/compat/tests/test_auth.py @@ -330,7 +330,7 @@ class ServiceCatalogTest(testtools.TestCase): self.case_no_endpoint_match(scObj) # case for empty service catalog - self.case_endpoing_with_empty_catalog(scObj) + self.case_endpoint_with_empty_catalog(scObj) # more than one matching endpoints self.case_ambiguous_endpoint(scObj) @@ -368,9 +368,9 @@ class ServiceCatalogTest(testtools.TestCase): self.assertRaises(exceptions.EndpointNotFound, scObj._url_for, attr="test_attr", filter_value=filter_value) - def case_endpoing_with_empty_catalog(self, scObj): - # first, test with empty catalog, this should pass since - # there is already enpoint added + def case_endpoint_with_empty_catalog(self, scObj): + # First, test with an empty catalog. This should pass since + # there is already an endpoint added. scObj.catalog[scObj.root_key]['serviceCatalog'] = list() endpoint = scObj.catalog['endpoints'][0] diff --git a/troveclient/compat/xml.py b/troveclient/compat/xml.py index 2ea39b10..59ec8e19 100644 --- a/troveclient/compat/xml.py +++ b/troveclient/compat/xml.py @@ -254,7 +254,7 @@ def populate_element_from_dict(element, dict): def modify_response_types(value, type_translator): """ This will convert some string in response dictionary to ints or bool - so that our respose is compatible with code expecting JSON style responses + so that our response is compatible with code expecting JSON style responses """ if isinstance(value, str): if value == 'True': diff --git a/troveclient/exceptions.py b/troveclient/exceptions.py index 5cfd2356..99e184e0 100644 --- a/troveclient/exceptions.py +++ b/troveclient/exceptions.py @@ -164,7 +164,7 @@ _code_map = dict((c.http_status, c) for c in [BadRequest, Unauthorized, def from_response(response, body): """ Return an instance of an ClientException or subclass - based on an request's response. + based on a request's response. Usage:: diff --git a/troveclient/shell.py b/troveclient/shell.py index aba52182..59c74da8 100644 --- a/troveclient/shell.py +++ b/troveclient/shell.py @@ -320,7 +320,7 @@ class OpenStackTroveShell(object): def _find_actions(self, subparsers, actions_module): for attr in (a for a in dir(actions_module) if a.startswith('do_')): - # I prefer to be hypen-separated instead of underscores. + # I prefer to be hyphen-separated instead of underscores. command = attr[3:].replace('_', '-') callback = getattr(actions_module, attr) desc = callback.__doc__ or '' diff --git a/troveclient/utils.py b/troveclient/utils.py index f8c30b77..ef339828 100644 --- a/troveclient/utils.py +++ b/troveclient/utils.py @@ -59,7 +59,7 @@ def add_arg(f, *args, **kwargs): # NOTE(sirp): avoid dups that can occur when the module is shared across # tests. if (args, kwargs) not in f.arguments: - # Because of the sematics of decorator composition if we just append + # Because of the semantics of decorator composition if we just append # to the options list positional options will appear to be backwards. f.arguments.insert(0, (args, kwargs)) diff --git a/troveclient/v1/root.py b/troveclient/v1/root.py index 58937934..297af59f 100644 --- a/troveclient/v1/root.py +++ b/troveclient/v1/root.py @@ -31,7 +31,7 @@ class Root(base.ManagerWithFind): def create(self, instance_id): """ Enable the root user and return the root password for the - sepcified db instance + specified db instance """ resp, body = self.api.client.post(self.url % instance_id) common.check_for_exceptions(resp, body) diff --git a/troveclient/v1/shell.py b/troveclient/v1/shell.py index 9bb7a345..0e054e7f 100644 --- a/troveclient/v1/shell.py +++ b/troveclient/v1/shell.py @@ -385,7 +385,7 @@ def do_user_delete(cs, args): @utils.arg('--host', metavar='', default=None, help='Optional host of user') @utils.service_type('database') -# Quoting is not working now that we arent using httplib2 +# Quoting is not working now that we aren't using httplib2 # anymore and instead are using requests def do_user_show(cs, args): """Gets a user from the instance.""" @@ -398,7 +398,7 @@ def do_user_show(cs, args): @utils.arg('--host', metavar='', default=None, help='Optional host of user') @utils.service_type('database') -# Quoting is not working now that we arent using httplib2 +# Quoting is not working now that we aren't using httplib2 # anymore and instead are using requests def do_user_show_access(cs, args): """Gets a users access from the instance.""" @@ -417,7 +417,7 @@ def do_user_show_access(cs, args): @utils.arg('--new_host', metavar='', default=None, help='Optional new host of user') @utils.service_type('database') -# Quoting is not working now that we arent using httplib2 +# Quoting is not working now that we aren't using httplib2 # anymore and instead are using requests def do_user_update_attributes(cs, args): """Updates a users attributes from the instance."""