diff options
| author | Stephen Finucane <sfinucan@redhat.com> | 2023-05-08 11:35:45 +0100 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2023-05-10 10:51:30 +0100 |
| commit | 7d80f9e9626d14ce2ab60e4b69e3ccd070f31e0d (patch) | |
| tree | 6498649965c44537669d58b2167b56612cd1490b /openstackclient/common/extension.py | |
| parent | 7ca43885c26d9dd7903e7015c0a31f3486730eea (diff) | |
| download | python-openstackclient-7d80f9e9626d14ce2ab60e4b69e3ccd070f31e0d.tar.gz | |
Blacken openstack.common
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: Ifcb3c798666d74d596b8ecb3d6d507f782de7ba5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/common/extension.py')
| -rw-r--r-- | openstackclient/common/extension.py | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/openstackclient/common/extension.py b/openstackclient/common/extension.py index 1ed2012c..a1b17d33 100644 --- a/openstackclient/common/extension.py +++ b/openstackclient/common/extension.py @@ -65,8 +65,14 @@ class ListExtension(command.Lister): def take_action(self, parsed_args): if parsed_args.long: - columns = ('Name', 'Alias', 'Description', - 'Namespace', 'Updated', 'Links') + columns = ( + 'Name', + 'Alias', + 'Description', + 'Namespace', + 'Updated', + 'Links', + ) else: columns = ('Name', 'Alias', 'Description') @@ -75,10 +81,12 @@ class ListExtension(command.Lister): # by default we want to show everything, unless the # user specifies one or more of the APIs to show # for now, only identity and compute are supported. - show_all = (not parsed_args.identity and - not parsed_args.compute and - not parsed_args.volume and - not parsed_args.network) + show_all = ( + not parsed_args.identity + and not parsed_args.compute + and not parsed_args.volume + and not parsed_args.network + ) if parsed_args.identity or show_all: identity_client = self.app.client_manager.identity @@ -101,8 +109,9 @@ class ListExtension(command.Lister): try: data += volume_client.list_extensions.show_all() except Exception: - message = _("Extensions list not supported by " - "Block Storage API") + message = _( + "Extensions list not supported by " "Block Storage API" + ) LOG.warning(message) if parsed_args.network or show_all: @@ -110,15 +119,17 @@ class ListExtension(command.Lister): try: data += network_client.extensions() except Exception: - message = _("Failed to retrieve extensions list " - "from Network API") + message = _( + "Failed to retrieve extensions list " "from Network API" + ) LOG.warning(message) extension_tuples = ( utils.get_item_properties( s, columns, - ) for s in data + ) + for s in data ) return (columns, extension_tuples) @@ -132,9 +143,11 @@ class ShowExtension(command.ShowOne): parser.add_argument( 'extension', metavar='<extension>', - help=_('Extension to display. ' - 'Currently, only network extensions are supported. ' - '(Name or Alias)'), + help=_( + 'Extension to display. ' + 'Currently, only network extensions are supported. ' + '(Name or Alias)' + ), ) return parser |
