summaryrefslogtreecommitdiff
path: root/swiftclient
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2022-03-21 18:19:50 +0000
committerStephen Finucane <stephenfin@redhat.com>2022-03-21 18:32:00 +0000
commit61ce5ac8244206c5e469e24459e365a5b0767dd5 (patch)
tree44bbb7030a3e8f9fa7c5f29d1fb8c2eddb58cae0 /swiftclient
parentfa137a5bf1f2a86cc15ebc4d973f245e1543105d (diff)
downloadpython-swiftclient-61ce5ac8244206c5e469e24459e365a5b0767dd5.tar.gz
Remove unnecessary object subclassing
All classes subclass from object by default in Python 3. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: I5a1ad57bcc092861ce969759b06a07c880ad3d35
Diffstat (limited to 'swiftclient')
-rw-r--r--swiftclient/authv1.py4
-rw-r--r--swiftclient/client.py6
-rw-r--r--swiftclient/multithreading.py4
-rw-r--r--swiftclient/service.py12
-rw-r--r--swiftclient/utils.py6
5 files changed, 16 insertions, 16 deletions
diff --git a/swiftclient/authv1.py b/swiftclient/authv1.py
index 705dcb4..84bc38a 100644
--- a/swiftclient/authv1.py
+++ b/swiftclient/authv1.py
@@ -68,7 +68,7 @@ UTC = _UTC()
del _UTC
-class ServiceCatalogV1(object):
+class ServiceCatalogV1:
def __init__(self, auth_url, storage_url, account):
self.auth_url = auth_url
self._storage_url = storage_url
@@ -148,7 +148,7 @@ class ServiceCatalogV1(object):
raise exceptions.EndpointNotFound(msg)
-class AccessInfoV1(object):
+class AccessInfoV1:
"""An object for encapsulating a raw v1 auth token."""
def __init__(self, auth_url, storage_url, account, username, auth_token,
diff --git a/swiftclient/client.py b/swiftclient/client.py
index df5344d..a9130ab 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -217,7 +217,7 @@ def encode_meta_headers(headers):
return ret
-class _ObjectBody(object):
+class _ObjectBody:
"""
Readable and iterable object body response wrapper.
"""
@@ -331,7 +331,7 @@ class _RetryBody(_ObjectBody):
return buf
-class HTTPConnection(object):
+class HTTPConnection:
def __init__(self, url, proxy=None, cacert=None, insecure=False,
cert=None, cert_key=None, ssl_compression=False,
default_user_agent=None, timeout=None):
@@ -1634,7 +1634,7 @@ def get_capabilities(http_conn):
return parse_api_response(resp_headers, body)
-class Connection(object):
+class Connection:
"""
Convenience class to make requests that will also retry the request
diff --git a/swiftclient/multithreading.py b/swiftclient/multithreading.py
index cf72360..eaccec6 100644
--- a/swiftclient/multithreading.py
+++ b/swiftclient/multithreading.py
@@ -19,7 +19,7 @@ from concurrent.futures import ThreadPoolExecutor
from queue import PriorityQueue
-class OutputManager(object):
+class OutputManager:
"""
One object to manage and provide helper functions for output.
@@ -108,7 +108,7 @@ class OutputManager(object):
self.error_print_pool.submit(self._print_error, msg, count=0)
-class MultiThreadingManager(object):
+class MultiThreadingManager:
"""
One object to manage context for multi-threading. This should make
bin/swift less error-prone and allow us to test this code.
diff --git a/swiftclient/service.py b/swiftclient/service.py
index 289e29e..4a7b120 100644
--- a/swiftclient/service.py
+++ b/swiftclient/service.py
@@ -315,7 +315,7 @@ def split_headers(options, prefix=''):
return headers
-class SwiftUploadObject(object):
+class SwiftUploadObject:
"""
Class for specifying an object upload, allowing the object source, name and
options to be specified separately for each individual object.
@@ -341,7 +341,7 @@ class SwiftUploadObject(object):
self.source = source
-class SwiftPostObject(object):
+class SwiftPostObject:
"""
Class for specifying an object post, allowing the headers/metadata to be
specified separately for each individual object.
@@ -355,7 +355,7 @@ class SwiftPostObject(object):
self.options = options
-class SwiftDeleteObject(object):
+class SwiftDeleteObject:
"""
Class for specifying an object delete, allowing the headers/metadata to be
specified separately for each individual object.
@@ -369,7 +369,7 @@ class SwiftDeleteObject(object):
self.options = options
-class SwiftCopyObject(object):
+class SwiftCopyObject:
"""
Class for specifying an object copy,
allowing the destination/headers/metadata/fresh_metadata to be specified
@@ -405,7 +405,7 @@ class SwiftCopyObject(object):
)
-class _SwiftReader(object):
+class _SwiftReader:
"""
Class for downloading objects from swift and raising appropriate
errors on failures caused by either invalid md5sum or size of the
@@ -470,7 +470,7 @@ class _SwiftReader(object):
return self._actual_read
-class SwiftService(object):
+class SwiftService:
"""
Service for performing swift operations
"""
diff --git a/swiftclient/utils.py b/swiftclient/utils.py
index 03e5e7b..e99ed37 100644
--- a/swiftclient/utils.py
+++ b/swiftclient/utils.py
@@ -254,7 +254,7 @@ def report_traceback():
return None, None
-class NoopMD5(object):
+class NoopMD5:
def __init__(self, *a, **kw):
pass
@@ -265,7 +265,7 @@ class NoopMD5(object):
return ''
-class ReadableToIterable(object):
+class ReadableToIterable:
"""
Wrap a filelike object and act as an iterator.
@@ -314,7 +314,7 @@ class ReadableToIterable(object):
return self
-class LengthWrapper(object):
+class LengthWrapper:
"""
Wrap a filelike object with a maximum length.