diff options
author | Zuul <zuul@review.opendev.org> | 2019-06-28 08:13:46 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2019-06-28 08:13:46 +0000 |
commit | 4b3e33b3c28892616d42cf3f1497dd8db63c783b (patch) | |
tree | 35e3421bf56bc0bf46f9d006f192382c88ccf9da | |
parent | 9021a58c240e156f54ffafdc4609868f348d3ebc (diff) | |
parent | 3b21157a844be5b71fba2216486c3ef412e7ae1a (diff) | |
download | python-swiftclient-4b3e33b3c28892616d42cf3f1497dd8db63c783b.tar.gz |
Merge "Clean up warnings from newer flake8"
-rw-r--r-- | swiftclient/client.py | 2 | ||||
-rw-r--r-- | swiftclient/service.py | 1 | ||||
-rwxr-xr-x | swiftclient/shell.py | 1 | ||||
-rw-r--r-- | tests/unit/test_shell.py | 4 | ||||
-rw-r--r-- | tox.ini | 3 |
5 files changed, 7 insertions, 4 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py index 4406689..f071182 100644 --- a/swiftclient/client.py +++ b/swiftclient/client.py @@ -39,7 +39,7 @@ from swiftclient.utils import ( # Default is 100, increase to 256 http_client._MAXHEADERS = 256 -VERSIONFUL_AUTH_PATH = re.compile('v[2-3](?:\.0)?$') +VERSIONFUL_AUTH_PATH = re.compile(r'v[2-3](?:\.0)?$') AUTH_VERSIONS_V1 = ('1.0', '1', 1) AUTH_VERSIONS_V2 = ('2.0', '2', 2) AUTH_VERSIONS_V3 = ('3.0', '3', 3) diff --git a/swiftclient/service.py b/swiftclient/service.py index 3ea7f61..06de091 100644 --- a/swiftclient/service.py +++ b/swiftclient/service.py @@ -174,6 +174,7 @@ def _build_default_global_options(): 'container_threads': 10 } + _default_global_options = _build_default_global_options() _default_local_options = { diff --git a/swiftclient/shell.py b/swiftclient/shell.py index 9ea5e95..0459533 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -58,6 +58,7 @@ def immediate_exit(signum, frame): stderr.write(" Aborted\n") os_exit(2) + st_delete_options = '''[--all] [--leave-segments] [--object-threads <threads>] [--container-threads <threads>] diff --git a/tests/unit/test_shell.py b/tests/unit/test_shell.py index 88e2c47..f729c25 100644 --- a/tests/unit/test_shell.py +++ b/tests/unit/test_shell.py @@ -1862,7 +1862,7 @@ class TestShell(unittest.TestCase): argv = ["", "tempurl", "GET", "60", '/v1/a/c', "secret_key", "--absolute", '--prefix-based'] with CaptureOutput(suppress_systemexit=True) as output: - swiftclient.shell.main(argv) + swiftclient.shell.main(argv) self.assertEqual(expected, output.err, 'Expected %r but got %r for path %r' % (expected, output.err, '/v1/a/c')) @@ -1872,7 +1872,7 @@ class TestShell(unittest.TestCase): argv = ["", "tempurl", "GET", bad_time, '/v1/a/c/o', "secret_key", "--absolute"] with CaptureOutput(suppress_systemexit=True) as output: - swiftclient.shell.main(argv) + swiftclient.shell.main(argv) self.assertEqual(expected, output.err, 'Expected %r but got %r for time %r' % (expected, output.err, bad_time)) @@ -79,7 +79,8 @@ commands= # H403: multi line docstrings should end on a new line # H404: multi line docstring should start without a leading new line # H405: multi line docstring summary not separated with an empty line -ignore = H101,H301,H306,H401,H403,H404,H405 +# W504: line break after binary operator +ignore = H101,H301,H306,H401,H403,H404,H405,W504 # H106: Don’t put vim configuration in source files # H203: Use assertIs(Not)None to check for None enable-extensions=H106,H203 |