Fix pre-commit issues

Mostly trailing spaces.

Change-Id: I3cde0f4bc51bdeb3e82859a131f866728234c9ad
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2023-09-04 16:05:13 +01:00
parent 72e81d7d84
commit 13424d1214
8 changed files with 31 additions and 29 deletions

View File

@ -50,7 +50,7 @@ def _table_tester_helper(tags, data, extra_args=None):
if extra_args is None:
# Default to no CLI arguments
parsed_args = args()
elif type(extra_args) == args:
elif isinstance(extra_args, args):
# Use the given CLI arguments
parsed_args = extra_args
else:

View File

@ -12,7 +12,7 @@ First, you need to create a virtual environment and activate it.
$ pip install virtualenv
$ virtualenv .venv
$ . .venv/bin/activate
(.venv)$
(.venv)$
Next, install ``cliff`` in the environment.

View File

@ -29,7 +29,7 @@ When you run the command, it will generate a bash-completion script:
local cur prev words
COMPREPLY=()
_get_comp_words_by_ref -n : cur prev words
# Command data:
cmds='agent aggregate backup'
cmds_agent='--name'

View File

@ -23,16 +23,16 @@ specified on the command line.
(.venv)$ cliffdemo
(cliffdemo) help
Shell commands (type help <topic>):
===================================
cmdenvironment edit hi l list pause r save shell show
ed help history li load py run set shortcuts
Undocumented commands:
======================
EOF eof exit q quit
Application commands (type help <topic>):
=========================================
files help simple file error two part
@ -41,12 +41,12 @@ To obtain instructions for a built-in or application command, use the
``help`` command:
::
(cliffdemo) help simple
usage: simple [-h]
A simple command that prints a message.
optional arguments:
-h, --help Show help message and exit.
@ -54,7 +54,7 @@ The commands can be run, including options and arguments, as on the
regular command line:
::
(cliffdemo) simple
sending greeting
hi!
@ -89,4 +89,4 @@ regular command line:
| tox.ini | 76 |
| tox.ini~ | 421 |
+----------------------+-------+
(cliffdemo)
(cliffdemo)

View File

@ -4,7 +4,7 @@
The cliff framework is meant to be used to create multi-level commands
such as subversion and git, where the main program handles some basic
argument parsing and then invokes a sub-command to do the work.
argument parsing and then invokes a sub-command to do the work.
Command Plugins
===============

View File

@ -35,7 +35,7 @@ output. CSV data can be imported into a database or spreadsheet for
further manipulation.
::
(.venv)$ cliffdemo files -f csv
"Name","Size"
"build",136
@ -52,7 +52,7 @@ for human consumption.
.. _PrettyTable: https://pypi.org/project/prettytable/
::
(.venv)$ cliffdemo files
+---------------+------+
| Name | Size |
@ -69,7 +69,7 @@ value
The ``value`` formatter produces a space separated output with no headers.
::
(.venv)$ cliffdemo files -f value
build 136
cliffdemo.log 2690
@ -80,7 +80,7 @@ This format can be very convenient when you want to pipe the output to
a script.
::
(.venv)$ cliffdemo files -f value | while read NAME SIZE
do
echo $NAME is $SIZE bytes
@ -125,15 +125,15 @@ format.
(.venv)$ cliffdemo files -f json
[
{
"Name": "source",
"Name": "source",
"Size": 4096
},
},
{
"Name": "Makefile",
"Name": "Makefile",
"Size": 5569
},
},
{
"Name": "build",
"Name": "build",
"Size": 4096
}
]

View File

@ -110,10 +110,10 @@ is the key.
(.venv)$ cliffdemo file -f json setup.py
{
"Modified Time": 1438726433.8055942,
"GID": 1000,
"UID": 1000,
"Name": "setup.py",
"Modified Time": 1438726433.8055942,
"GID": 1000,
"UID": 1000,
"Name": "setup.py",
"Size": 1028
}

View File

@ -7,6 +7,8 @@ Usage
cliff supports integration with Sphinx by way of a `Sphinx directives`__.
__ http://www.sphinx-doc.org/en/stable/extdev/markupapi.html
Preparation
-----------
@ -68,6 +70,8 @@ Directive
This option is effective only in the **command** mode.
__ https://docs.python.org/3/library/fnmatch.html
`:arguments`
The arguments to be passed when the cliff application is instantiated.
Some cliff applications requires arguments when instantiated.
@ -154,8 +158,8 @@ Examples
Simple Example (`demoapp`)
--------------------------
`cliff` provides a sample application, :doc:`demoapp`, to demonstrate some of the
features of `cliff`. This application :ref:`is documented <demoapp-sphinx>`
`cliff` provides a sample application, :doc:`demoapp`, to demonstrate some of
the features of `cliff`. This application :ref:`is documented <demoapp-sphinx>`
using the `cliff.sphinxext` Sphinx extension.
Advanced Example (`python-openstackclient`)
@ -206,6 +210,4 @@ usage examples show the full command name:
autoprogram_cliff_application = 'openstack'
__ http://www.sphinx-doc.org/en/stable/extdev/markupapi.html
__ https://docs.python.org/3/library/fnmatch.html
__ https://docs.openstack.org/python-openstackclient/