Fix pre-commit issues

Change-Id: Ie973475b714e01b0619acd5554a88f7da9014edc
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2023-08-30 19:22:59 +01:00
parent d889faa0cd
commit 147c01e734
6 changed files with 23 additions and 19 deletions

View File

@ -34,6 +34,8 @@ used with other data structure literals and terminate the method call with
the last argument line ending with a comma and the closing parentheses on its
own line indented to the starting line level.
.. code-block:: python
unnecessarily_long_function_name(
'string one',
'string two',

View File

@ -4,8 +4,8 @@
osc-lib utilizes all of the usual OpenStack processes and requirements for
contributions. The code is hosted `on OpenStack's Git server`_. `Bug reports`_
and `blueprints`_ may be submitted to the :code:`python-openstackclient` project
on `Launchpad`_. Code may be submitted to the
and `blueprints`_ may be submitted to the :code:`python-openstackclient`
project on `Launchpad`_. Code may be submitted to the
:code:`openstack/osc-lib` project using `Gerrit`_.
Developers may also be found in the `IRC channel`_ ``#openstack-sdks``.

View File

@ -13,7 +13,8 @@ The complete list of public module name changes:
* ``openstackclient.api.auth`` -> ``osc_lib.api.auth``
* ``openstackclient.api.utils`` -> ``osc_lib.api.utils``
* ``openstackclient.common.command`` -> ``osc_lib.command.command``
* ``openstackclient.common.commandmanager`` -> ``osc_lib.command.commandmanager``
* ``openstackclient.common.commandmanager`` ->
``osc_lib.command.commandmanager``
* ``openstackclient.common.exceptions`` -> ``osc_lib.exceptions``
* ``openstackclient.common.logs`` -> ``osc_lib.logs``
* ``openstackclient.common.parseractions`` -> ``osc_lib.cli.parseractions``
@ -26,25 +27,26 @@ Additional Changes
==================
In addition to the existing public modules, other parts of OSC have been
extracted, including the base ``Command``, ``CommandManager``, ``ClientManager``
and ``Session`` classes.
extracted, including the base ``Command``, ``CommandManager``,
``ClientManager`` and ``Session`` classes.
ClientManager
-------------
The OSC ``ClientManager`` is responsible for managing all of the handles to the
individual API client objects as well as coordinating session and authentication
objects.
individual API client objects as well as coordinating session and
authentication objects.
Plugins are encouraged to use the ClientManager interface for obtaining information
about global configuration.
Plugins are encouraged to use the ClientManager interface for obtaining
information about global configuration.
* ``openstackclient.common.clientmanager`` -> ``osc_lib.clientmanager``
* All of the handling of the ``verify``/``insecure``/``cacert`` configuration
options has been consolidated into ``ClientManager``. This converts the ``--verify``,
``--insecure`` and ``--os-cacert`` options into a ``Requests``-compatible
``verify`` attribute and a ``cacert`` attribute for the legacy client libraries.
both are now public; the ``_insecure`` attribute has been removed.
options has been consolidated into ``ClientManager``. This converts the
``--verify``, ``--insecure`` and ``--os-cacert`` options into a
``Requests``-compatible ``verify`` attribute and a ``cacert`` attribute for
the legacy client libraries. both are now public; the ``_insecure`` attribute
has been removed.
.. list-table:: Verify/Insecure/CACert
:header-rows: 1
@ -79,8 +81,8 @@ about global configuration.
- ``verify=False``, ``cacert=None``
* A number of other ``ClientManager`` attributes have also been made public to
encourage their direct use rather than reaching in to the global options passed
in the ``ClientManager`` constructor:
encourage their direct use rather than reaching in to the global options
passed in the ``ClientManager`` constructor:
* ``_verify`` -> ``verify``
* ``_cacert`` -> ``cacert``

View File

@ -106,9 +106,9 @@ class TestListDictColumn(utils.TestCase):
col = format_columns.ListDictColumn(data)
# we explicitly check type rather than use isinstance since an
# OrderedDict is a subclass of dict and would inadvertently pass
self.assertEqual(type(col.machine_readable()), list)
self.assertEqual(type(col.machine_readable()), list) # noqa: H212
for x in col.machine_readable():
self.assertEqual(type(x), dict)
self.assertEqual(type(x), dict) # noqa: H212
class TestSizeColumn(utils.TestCase):

View File

@ -47,7 +47,7 @@ fixes:
move all option special-cases into ``cli.client_config.OSC_Config``.
Also change some private attributes to public (``region_name``,
``interface``, ``cacert``, ``verify`` and remove ``_insecure``).
- Refactor ``OpenStackShell`` to handle only global argument
- Refactor ``OpenStackShell`` to handle only global argument
processing and setting up the ClientManager with configuration
from ``os-client-config``. Command and plugin loading remain in
OSC.

View File

@ -4,7 +4,7 @@ features:
Added new options `--os-service-provider`, `--os-remote-project-name`,
`--os-remote-project-domain-name`, `--os-remote-project-domain-id`, and
`--os-remote-project-id`. These can also be loaded from their respective
ENV variables (ex. `OS_SERVICE_PROVIDER` and `OS_REMOTE_PROJECT_ID`) and
ENV variables (ex. `OS_SERVICE_PROVIDER` and `OS_REMOTE_PROJECT_ID`) and
allow issuing of commands to a federated cloud using keystone-to-keystone
identity federation. More information about keystone-to-keystone can be
found `here <https://specs.openstack.org/openstack/keystone-specs/specs/juno/keystone-to-keystone-federation.html>`_.