summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2023-05-08 11:37:42 +0100
committerStephen Finucane <sfinucan@redhat.com>2023-05-10 10:51:30 +0100
commitd3f4a3d7f5a14c78b56bcc0609c32f74f0c0f845 (patch)
tree8759b78c1819a699609ec18fb1423a5d6bcca1af /examples
parenta6f81a736c503e45e1fca9fe49f9f46b9ced7cb8 (diff)
downloadpython-openstackclient-d3f4a3d7f5a14c78b56bcc0609c32f74f0c0f845.tar.gz
Blacken everything else
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: I356643d06b2cd408ccaedfe02b858aea55388949 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/common.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/common.py b/examples/common.py
index d472fe6b..d97bfb55 100755
--- a/examples/common.py
+++ b/examples/common.py
@@ -57,6 +57,7 @@ dump_stack_trace = False
# Generally useful stuff often found in a utils module
+
def env(*vars, **kwargs):
"""Search for the first defined of possibly many env vars
@@ -73,6 +74,7 @@ def env(*vars, **kwargs):
# Common Example functions
+
def base_parser(parser):
"""Set up some of the common CLI options
@@ -128,7 +130,8 @@ def base_parser(parser):
help="Print API call timing info",
)
parser.add_argument(
- '-v', '--verbose',
+ '-v',
+ '--verbose',
action='count',
dest='verbose_level',
default=1,
@@ -225,16 +228,14 @@ def make_session(opts, **kwargs):
)
auth_p = auth_plugin.load_from_options(**auth_params)
- session = ks_session.Session(
- auth=auth_p,
- **kwargs
- )
+ session = ks_session.Session(auth=auth_p, **kwargs)
return session
# Top-level functions
+
def run(opts):
"""Default run command"""