Merge "Fix pre-commit issues"

This commit is contained in:
Zuul 2023-11-13 18:29:46 +00:00 committed by Gerrit Code Review
commit 9d02ad3460
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):