Skip to content

Commit

Permalink
Fix Lint Issue - super
Browse files Browse the repository at this point in the history
  • Loading branch information
RayLiu7 committed Jan 14, 2025
1 parent 35a3da8 commit 231eb1d
Show file tree
Hide file tree
Showing 26 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion PyPowerFlex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self,
def __getattr__(self, item):
if not self.__is_initialized and item in self.__slots__:
raise exceptions.ClientNotInitialized
return super(PowerFlexClient, self).__getattribute__(item)
return super().__getattribute__(item)

def __add_storage_entity(self, attr_name, entity_class):
setattr(self, attr_name, entity_class(self.token, self.configuration))
Expand Down
8 changes: 4 additions & 4 deletions PyPowerFlex/objects/sds.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self,
},
dump=False
)
super(AccelerationDeviceInfo, self).__init__(**params)
super().__init__(**params)


class DeviceInfo:
Expand All @@ -100,7 +100,7 @@ def __init__(self,
},
dump=False
)
super(DeviceInfo, self).__init__(**params)
super().__init__(**params)


class RfcacheDevice(dict):
Expand All @@ -118,7 +118,7 @@ def __init__(self, path, name):
},
dump=False
)
super(RfcacheDevice, self).__init__(**params)
super().__init__(**params)


class SdsIp(dict):
Expand All @@ -136,7 +136,7 @@ def __init__(self, ip, role):
},
dump=False
)
super(SdsIp, self).__init__(**params)
super().__init__(**params)


class Sds(base_client.EntityRequest):
Expand Down
2 changes: 1 addition & 1 deletion PyPowerFlex/objects/sdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, ip, role):
},
dump=False,
)
super(SdtIp, self).__init__(**params)
super().__init__(**params)


class SdtIpRoles:
Expand Down
4 changes: 2 additions & 2 deletions PyPowerFlex/objects/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ def __init__(self, volume_id, name=None):
},
dump=False
)
super(SnapshotDef, self).__init__(**params)
super().__init__(**params)


class System(base_client.EntityRequest):
"""Client for system operations"""
def __init__(self, token, configuration):
self.__api_version = None
super(System, self).__init__(token, configuration)
super().__init__(token, configuration)

def api_version(self, cached=True):
"""Get PowerFlex API version.
Expand Down
2 changes: 1 addition & 1 deletion PyPowerFlex/objects/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
class PowerFlexUtility(base_client.EntityRequest):
"Utility class for PowerFlex"
def __init__(self, token, configuration):
super(PowerFlexUtility, self).__init__(token, configuration)
super().__init__(token, configuration)

def get_statistics_for_all_storagepools(self, ids=None, properties=None):
"""list storagepool statistics for PowerFlex.
Expand Down
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, content, status_code=200):
content (str or dict): The content of the response.
status_code (int): The status code of the response.
"""
super(MockResponse, self).__init__()
super().__init__()
self._content = content
self.request = mock.MagicMock()
self.status_code = status_code
Expand All @@ -69,7 +69,7 @@ def text(self):
"""
if not isinstance(self._content, bytes):
return json.dumps(self._content)
return super(MockResponse, self).text
return super().text


class PyPowerFlexTestCase(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_acceleration_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestAccelerationPoolClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_pd_id = '1'
self.fake_ap_id = '1'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestBaseClient, self).setUp()
super().setUp()
self.fake_response = [
{
'first': 1,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestDeploymentClient, self).setUp()
super().setUp()
self.client.initialize()
self.RESPONSE_204 = "<Response 204>"
self.deployment_id = '8aaa03a88de961fa018de9c882d20301'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestDeviceClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_device_id = '1'
self.fake_sds_id = '1'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fault_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestFaultSetClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_fault_set_id = '1'
self.fake_pd_id = '1'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_firmware_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestFirmwareRepositoryClient, self).setUp()
super().setUp()
self.client.initialize()

self.MOCK_RESPONSES = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestHostClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_host_id="1"
self.fake_nqn = "nqn::"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_managed_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestManagedDeviceClient, self).setUp()
super().setUp()
self.client.initialize()

self.MOCK_RESPONSES = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_protection_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestProtectionDomainClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_pd_id = '1'

Expand Down
2 changes: 1 addition & 1 deletion tests/test_replication_consistency_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestReplicationConsistencyGroupClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_rcg_id = '1'

Expand Down
2 changes: 1 addition & 1 deletion tests/test_replication_pair.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestReplicationPairClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_replication_pair_id = '1'

Expand Down
2 changes: 1 addition & 1 deletion tests/test_sdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setUp(self):
"""
Set up the test case.
"""
super(TestSdcClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_sdc_id = '1'

Expand Down
2 changes: 1 addition & 1 deletion tests/test_sds.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestSdsClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_sds_id = '1'
self.fake_sp_id = '1'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestSdtClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_sdt_id = "1"
self.fake_sdt_name = "1"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_service_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestServiceTemplateClient, self).setUp()
super().setUp()
self.client.initialize()
self.template_id = 1234
self.MOCK_RESPONSES = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_snapshot_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test case.
"""
super(TestSnapshotPolicyClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_policy_id = '1'
self.fake_volume_id = '1'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_storage_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestStoragePoolClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_pd_id = '1'
self.fake_sp_id = '1'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
"""
Set up the test environment.
"""
super(TestSystemClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_system_id = '1'
self.fake_cg_id = '1'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setUp(self):
"""
Set up the test case.
"""
super(TestPowerFlexUtility, self).setUp()
super().setUp()
self.client.initialize()

self.MOCK_RESPONSES = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setUp(self):
"""
Set up the test case.
"""
super(TestVolumeClient, self).setUp()
super().setUp()
self.client.initialize()
self.fake_sp_id = '1'
self.fake_volume_id = '1'
Expand Down

0 comments on commit 231eb1d

Please sign in to comment.