From b5b402f6c4696828b6b39f6a663bac769620d1d5 Mon Sep 17 00:00:00 2001 From: yuhao_liu Date: Tue, 14 Jan 2025 21:27:51 -0500 Subject: [PATCH] Fix Lint Issue - Final --- .github/workflows/pylint.yml | 4 ++++ PyPowerFlex/__init__.py | 2 ++ PyPowerFlex/base_client.py | 4 +++- PyPowerFlex/configuration.py | 2 ++ PyPowerFlex/constants.py | 2 ++ PyPowerFlex/exceptions.py | 5 ++--- PyPowerFlex/objects/acceleration_pool.py | 12 +++++++----- PyPowerFlex/objects/deployment.py | 2 ++ PyPowerFlex/objects/device.py | 2 ++ PyPowerFlex/objects/fault_set.py | 2 ++ PyPowerFlex/objects/firmware_repository.py | 2 ++ PyPowerFlex/objects/managed_device.py | 2 ++ PyPowerFlex/objects/protection_domain.py | 2 ++ .../objects/replication_consistency_group.py | 2 ++ PyPowerFlex/objects/replication_pair.py | 2 ++ PyPowerFlex/objects/sdc.py | 2 -- PyPowerFlex/objects/sds.py | 2 ++ PyPowerFlex/objects/sdt.py | 2 ++ PyPowerFlex/objects/service_template.py | 2 ++ PyPowerFlex/objects/snapshot_policy.py | 10 ++++++---- PyPowerFlex/objects/storage_pool.py | 11 +++++++---- PyPowerFlex/objects/system.py | 2 ++ PyPowerFlex/objects/utility.py | 16 ++++++++++++---- PyPowerFlex/objects/volume.py | 2 ++ PyPowerFlex/utils.py | 12 ++++++------ README.md | 2 +- setup.py | 4 ++++ tests/__init__.py | 9 +++++---- tests/test_acceleration_pool.py | 8 +++++--- tests/test_deployment.py | 2 ++ tests/test_device.py | 2 ++ tests/test_fault_set.py | 2 ++ tests/test_firmware_repository.py | 2 ++ tests/test_host.py | 2 ++ tests/test_managed_device.py | 2 ++ tests/test_protection_domain.py | 2 ++ tests/test_replication_consistency_group.py | 3 ++- tests/test_replication_pair.py | 3 ++- tests/test_sdc.py | 2 ++ tests/test_sds.py | 2 ++ tests/test_sdt.py | 2 ++ tests/test_service_template.py | 2 ++ tests/test_snapshot_policy.py | 2 ++ tests/test_storage_pool.py | 2 ++ tests/test_system.py | 2 ++ tests/test_utility.py | 3 ++- tests/test_volume.py | 2 ++ 47 files changed, 130 insertions(+), 40 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 79cf081..bb496d8 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -23,5 +23,9 @@ jobs: - name: Install dependencies run: python -m pip install --upgrade pip && pip install pylint + - name: Install requirements + run: | + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Analyzing the code with pylint run: pylint $(git ls-files '*.py') diff --git a/PyPowerFlex/__init__.py b/PyPowerFlex/__init__.py index f2b24a0..943951d 100644 --- a/PyPowerFlex/__init__.py +++ b/PyPowerFlex/__init__.py @@ -15,6 +15,8 @@ """This module is used for the initialization of PowerFlex Client.""" +# pylint: disable=invalid-name,too-many-arguments,too-many-positional-arguments + from packaging import version from PyPowerFlex import configuration diff --git a/PyPowerFlex/base_client.py b/PyPowerFlex/base_client.py index 615a895..79ccb9d 100644 --- a/PyPowerFlex/base_client.py +++ b/PyPowerFlex/base_client.py @@ -15,6 +15,8 @@ """This module is the base client of the PowerFlex APIs.""" +# pylint: disable=no-member,import-error,broad-exception-raised + import logging import requests @@ -335,7 +337,7 @@ def _login(self): else f'Login failed with error: {str(e)}' ) LOG.error(error_msg) - raise Exception(error_msg) + raise Exception(error_msg) from e def _logout(self): """ diff --git a/PyPowerFlex/configuration.py b/PyPowerFlex/configuration.py index 9d2ae68..5517ead 100644 --- a/PyPowerFlex/configuration.py +++ b/PyPowerFlex/configuration.py @@ -15,6 +15,8 @@ """This module is used for the configuration of the client.""" +# pylint: disable=too-many-instance-attributes,too-many-arguments,too-many-positional-arguments,too-few-public-methods + from PyPowerFlex import exceptions class Configuration: diff --git a/PyPowerFlex/constants.py b/PyPowerFlex/constants.py index fe591b5..ee56ff7 100644 --- a/PyPowerFlex/constants.py +++ b/PyPowerFlex/constants.py @@ -15,6 +15,8 @@ """This module contains the definitions of constants used in the code.""" +# pylint: disable=too-few-public-methods + class StoragePoolConstants: """ This class holds constants related to StoragePool. diff --git a/PyPowerFlex/exceptions.py b/PyPowerFlex/exceptions.py index feab6ef..2526e09 100644 --- a/PyPowerFlex/exceptions.py +++ b/PyPowerFlex/exceptions.py @@ -15,6 +15,8 @@ """This module contains the definitions of the exceptions used in the code.""" +# pylint: disable=super-init-not-called + class PowerFlexClientException(Exception): """ Base class for all exceptions raised by the PowerFlexClient. @@ -42,21 +44,18 @@ class InvalidConfiguration(PowerFlexClientException): """ Exception raised when the configuration is invalid. """ - pass class FieldsNotFound(PowerFlexClientException): """ Exception raised when the required fields are not found. """ - pass class InvalidInput(PowerFlexClientException): """ Exception raised when the input is invalid. """ - pass class PowerFlexFailCreating(PowerFlexClientException): diff --git a/PyPowerFlex/objects/acceleration_pool.py b/PyPowerFlex/objects/acceleration_pool.py index 5de1124..81667e8 100644 --- a/PyPowerFlex/objects/acceleration_pool.py +++ b/PyPowerFlex/objects/acceleration_pool.py @@ -15,6 +15,8 @@ """Module for interacting with accelaration pool APIs.""" +# pylint: disable=too-few-public-methods,duplicate-code + import logging from PyPowerFlex import base_client from PyPowerFlex import exceptions @@ -40,25 +42,25 @@ def create(self, media_type, protection_domain_id, name=None, - isRfcache=None): + is_rfcache=None): """Create PowerFlex acceleration pool. :param media_type: one of predefined attributes of MediaType :type media_type: str :type protection_domain_id: str :type name: str - :type isRfcache: bool + :type is_rfcache: bool :rtype: dict """ - if media_type == MediaType.ssd and not isRfcache: - msg = 'isRfcache must be set for media_type SSD.' + if media_type == MediaType.ssd and not is_rfcache: + msg = 'is_rfcache must be set for media_type SSD.' raise exceptions.InvalidInput(msg) params = { 'mediaType': media_type, 'protectionDomainId': protection_domain_id, 'name': name, - 'isRfcache': isRfcache + 'isRfcache': is_rfcache } return self._create_entity(params) diff --git a/PyPowerFlex/objects/deployment.py b/PyPowerFlex/objects/deployment.py index a987b24..7798e92 100644 --- a/PyPowerFlex/objects/deployment.py +++ b/PyPowerFlex/objects/deployment.py @@ -15,6 +15,8 @@ """Module for doing the deployment.""" +# pylint: disable=arguments-renamed,too-many-arguments,too-many-positional-arguments,no-member + import logging import requests from PyPowerFlex import base_client diff --git a/PyPowerFlex/objects/device.py b/PyPowerFlex/objects/device.py index c42f096..49e9922 100644 --- a/PyPowerFlex/objects/device.py +++ b/PyPowerFlex/objects/device.py @@ -15,6 +15,8 @@ """Module for interacting with device APIs.""" +# pylint: disable=too-few-public-methods,too-many-arguments,too-many-positional-arguments,no-member + import logging import requests diff --git a/PyPowerFlex/objects/fault_set.py b/PyPowerFlex/objects/fault_set.py index c6c1b6e..a47b1fa 100644 --- a/PyPowerFlex/objects/fault_set.py +++ b/PyPowerFlex/objects/fault_set.py @@ -15,6 +15,8 @@ """Module for interacting with fault set APIs.""" +# pylint: disable=no-member,duplicate-code + import logging import requests diff --git a/PyPowerFlex/objects/firmware_repository.py b/PyPowerFlex/objects/firmware_repository.py index c4642ca..161cd9b 100644 --- a/PyPowerFlex/objects/firmware_repository.py +++ b/PyPowerFlex/objects/firmware_repository.py @@ -15,6 +15,8 @@ """Module for interacting with firmware repository APIs.""" +# pylint: disable=arguments-renamed,no-member,too-many-arguments,too-many-positional-arguments + import logging import requests from PyPowerFlex import base_client diff --git a/PyPowerFlex/objects/managed_device.py b/PyPowerFlex/objects/managed_device.py index 6ea1581..f7641ae 100644 --- a/PyPowerFlex/objects/managed_device.py +++ b/PyPowerFlex/objects/managed_device.py @@ -15,6 +15,8 @@ """Module for interacting with managed device APIs.""" +# pylint: disable=arguments-renamed,no-member + import logging import requests from PyPowerFlex import base_client diff --git a/PyPowerFlex/objects/protection_domain.py b/PyPowerFlex/objects/protection_domain.py index 432892e..438996c 100644 --- a/PyPowerFlex/objects/protection_domain.py +++ b/PyPowerFlex/objects/protection_domain.py @@ -15,6 +15,8 @@ """Module for interacting with protection domain APIs.""" +# pylint: disable=too-few-public-methods,no-member,too-many-arguments,too-many-positional-arguments,duplicate-code + import logging import requests diff --git a/PyPowerFlex/objects/replication_consistency_group.py b/PyPowerFlex/objects/replication_consistency_group.py index bcc13f1..23e5256 100644 --- a/PyPowerFlex/objects/replication_consistency_group.py +++ b/PyPowerFlex/objects/replication_consistency_group.py @@ -15,6 +15,8 @@ """Module for interacting with replication consistency group APIs.""" +# pylint: disable=too-many-public-methods,no-member,too-many-arguments,too-many-positional-arguments,duplicate-code + import logging import requests diff --git a/PyPowerFlex/objects/replication_pair.py b/PyPowerFlex/objects/replication_pair.py index f46e910..60b8915 100644 --- a/PyPowerFlex/objects/replication_pair.py +++ b/PyPowerFlex/objects/replication_pair.py @@ -15,6 +15,8 @@ """Module for interacting with replication pair APIs.""" +# pylint: disable=redefined-builtin,no-member,too-many-arguments,too-many-positional-arguments,duplicate-code + import logging import requests diff --git a/PyPowerFlex/objects/sdc.py b/PyPowerFlex/objects/sdc.py index 8865056..614c123 100644 --- a/PyPowerFlex/objects/sdc.py +++ b/PyPowerFlex/objects/sdc.py @@ -16,9 +16,7 @@ """Module for interacting with SDC APIs.""" import logging -import requests from PyPowerFlex import base_client -from PyPowerFlex import exceptions LOG = logging.getLogger(__name__) diff --git a/PyPowerFlex/objects/sds.py b/PyPowerFlex/objects/sds.py index 744837b..54c4787 100644 --- a/PyPowerFlex/objects/sds.py +++ b/PyPowerFlex/objects/sds.py @@ -15,6 +15,8 @@ """Module for interacting with SDS APIs.""" +# pylint: disable=too-few-public-methods,no-member,too-many-arguments,too-many-positional-arguments,too-many-locals,duplicate-code + import logging import requests diff --git a/PyPowerFlex/objects/sdt.py b/PyPowerFlex/objects/sdt.py index ed7e79d..40d7878 100644 --- a/PyPowerFlex/objects/sdt.py +++ b/PyPowerFlex/objects/sdt.py @@ -15,6 +15,8 @@ """Module for interacting with SDT APIs.""" +# pylint: disable=too-few-public-methods,no-member,too-many-arguments,too-many-positional-arguments + import logging import requests from PyPowerFlex import base_client diff --git a/PyPowerFlex/objects/service_template.py b/PyPowerFlex/objects/service_template.py index 43a9044..4997426 100644 --- a/PyPowerFlex/objects/service_template.py +++ b/PyPowerFlex/objects/service_template.py @@ -15,6 +15,8 @@ """Module for interacting with service template APIs.""" +# pylint: disable=arguments-renamed,no-member,too-many-arguments,too-many-positional-arguments + import logging import requests from PyPowerFlex import base_client diff --git a/PyPowerFlex/objects/snapshot_policy.py b/PyPowerFlex/objects/snapshot_policy.py index 8228dae..b3b8889 100644 --- a/PyPowerFlex/objects/snapshot_policy.py +++ b/PyPowerFlex/objects/snapshot_policy.py @@ -15,6 +15,8 @@ """Module for interacting with snapshot policy APIs.""" +# pylint: disable=too-few-public-methods,no-member,too-many-arguments,too-many-positional-arguments + import logging import requests @@ -70,8 +72,8 @@ def create(self, retained_snaps_per_level, name=None, paused=None, - snapshotAccessMode=None, - secureSnapshots=None): + snapshot_access_mode=None, + secure_snapshots=None): """Create PowerFlex snapshot policy. :type auto_snap_creation_cadence_in_min: int @@ -86,8 +88,8 @@ def create(self, "numOfRetainedSnapshotsPerLevel": retained_snaps_per_level, "name": name, "paused": paused, - "snapshotAccessMode": snapshotAccessMode, - "secureSnapshots": secureSnapshots + "snapshotAccessMode": snapshot_access_mode, + "secureSnapshots": secure_snapshots } return self._create_entity(params) diff --git a/PyPowerFlex/objects/storage_pool.py b/PyPowerFlex/objects/storage_pool.py index c4c3615..149b19c 100644 --- a/PyPowerFlex/objects/storage_pool.py +++ b/PyPowerFlex/objects/storage_pool.py @@ -15,6 +15,8 @@ """Module for interacting with storage pool APIs.""" +# pylint: disable=too-few-public-methods,too-many-public-methods,no-member,too-many-arguments,too-many-positional-arguments,too-many-locals,cyclic-import,duplicate-code + import logging import requests @@ -359,7 +361,7 @@ def set_rebalance_enabled(self, storage_pool_id, rebalance_enabled): "rebalanceEnabled": rebalance_enabled } - r, response = self.send_post_request(self.base_action_url, + r, _ = self.send_post_request(self.base_action_url, action=action, entity=self.entity, entity_id=storage_pool_id, @@ -562,7 +564,7 @@ def set_cap_alert_thresholds( params=params) if r.status_code != requests.codes.ok: msg = ( - f'Failed to set the capacity alert thresholds for PowerFlex {self.entity}' + f'Failed to set the capacity alert thresholds for PowerFlex {self.entity}' f'with id {storage_pool_id}. Error: {response}') LOG.error(msg) raise exceptions.PowerFlexClientException(msg) @@ -595,8 +597,9 @@ def set_protected_maintenance_mode_io_priority_policy( params=params) if r.status_code != requests.codes.ok: msg = ( - f'Failed to set the protected maintenance mode IO priority policy for PowerFlex {self.entity} ' - f'with id {storage_pool_id}. Error: {response}') + f'Failed to set the protected maintenance mode IO priority policy for ' + f'PowerFlex {self.entity} with id {storage_pool_id}. Error: {response}' + ) LOG.error(msg) raise exceptions.PowerFlexClientException(msg) diff --git a/PyPowerFlex/objects/system.py b/PyPowerFlex/objects/system.py index 5150231..40b7957 100644 --- a/PyPowerFlex/objects/system.py +++ b/PyPowerFlex/objects/system.py @@ -15,6 +15,8 @@ """Module for doing system-related operations.""" +# pylint: disable=no-member,too-many-arguments,too-many-positional-arguments + import logging import re diff --git a/PyPowerFlex/objects/utility.py b/PyPowerFlex/objects/utility.py index ef723b2..db60eea 100644 --- a/PyPowerFlex/objects/utility.py +++ b/PyPowerFlex/objects/utility.py @@ -15,13 +15,13 @@ """Utility module for PowerFlex.""" +# pylint: disable=no-member,useless-parent-delegation import logging import requests from PyPowerFlex import base_client from PyPowerFlex import exceptions -from PyPowerFlex import utils from PyPowerFlex.constants import StoragePoolConstants, VolumeConstants, SnapshotPolicyConstants @@ -79,7 +79,12 @@ def get_statistics_for_all_volumes(self, ids=None, properties=None): action = 'querySelectedStatistics' params = { - 'properties': VolumeConstants.DEFAULT_STATISTICS_PROPERTIES if properties is None else properties} + 'properties': ( + VolumeConstants.DEFAULT_STATISTICS_PROPERTIES + if properties is None + else properties + ) + } if ids is None: params['allIds'] = "" else: @@ -110,8 +115,11 @@ def get_statistics_for_all_snapshot_policies( action = 'querySelectedStatistics' - params = { - 'properties': SnapshotPolicyConstants.DEFAULT_STATISTICS_PROPERTIES if properties is None else properties} + params = {} + if properties is None: + params['properties'] = SnapshotPolicyConstants.DEFAULT_STATISTICS_PROPERTIES + else: + params['properties'] = properties if ids is None: params['allIds'] = "" else: diff --git a/PyPowerFlex/objects/volume.py b/PyPowerFlex/objects/volume.py index 9978e0f..87f3c55 100644 --- a/PyPowerFlex/objects/volume.py +++ b/PyPowerFlex/objects/volume.py @@ -15,6 +15,8 @@ """Module for interacting with volume APIs.""" +# pylint: disable=too-few-public-methods,no-member,too-many-arguments,too-many-positional-arguments + import logging import requests diff --git a/PyPowerFlex/utils.py b/PyPowerFlex/utils.py index d9a50f6..177229e 100644 --- a/PyPowerFlex/utils.py +++ b/PyPowerFlex/utils.py @@ -80,7 +80,7 @@ def query_response_fields(response, fields): def query_entity_fields(entity): entity_fields = {} - fields_not_found = list() + fields_not_found = [] for field in fields: try: entity_fields[field] = entity[field] @@ -96,8 +96,9 @@ def query_entity_fields(entity): if isinstance(response, list): return list(map(query_entity_fields, response)) - elif isinstance(response, dict): + if isinstance(response, dict): return query_entity_fields(response) + return None def convert(param): @@ -109,12 +110,11 @@ def convert(param): """ if isinstance(param, list): return [convert(item) for item in param] - elif isinstance(param, (numbers.Number, bool)): + if isinstance(param, (numbers.Number, bool)): # Convert numbers and boolean to string. return str(param) - else: - # Other types are not converted. - return param + # Other types are not converted. + return param def prepare_params(params, dump=True): diff --git a/README.md b/README.md index 71ca540..c38be70 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ from PyPowerFlex.objects.acceleration_pool import MediaType client.acceleration_pool.create(media_type=MediaType.ssd, protection_domain_id='1caf743100000000', name='ACP_SSD', - isRfcache=True) + is_rfcache=True) client.acceleration_pool.get(filter_fields={'id': '9c8c5c7800000001'}, fields=['name', 'id']) [{'name': 'ACP_SSD', 'id': '9c8c5c7800000001'}] diff --git a/setup.py b/setup.py index b9d3303..999daad 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +"""Module for general setup.""" + +# pylint: disable=import-error + from setuptools import setup setup( diff --git a/tests/__init__.py b/tests/__init__.py index 459f35e..74cebf5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -15,6 +15,8 @@ """This module is used for the initialization of the test framework.""" +# pylint: disable=too-many-instance-attributes,keyword-arg-before-vararg,broad-exception-raised,unused-argument + import collections import contextlib import json @@ -198,7 +200,7 @@ def get_mock_response(self, url, request_url=None, mode=None, *args, **kwargs): response = self.RESPONSE_MODE.Valid[2] else: response = self.MOCK_RESPONSES[mode][api_path] - except KeyError: + except KeyError as e: try: response = self.DEFAULT_MOCK_RESPONSES[mode][api_path] except KeyError: @@ -208,7 +210,7 @@ def get_mock_response(self, url, request_url=None, mode=None, *args, **kwargs): raise Exception( f"Mock API Endpoint is not implemented: [{mode}]" f"{api_path}" - ) + ) from e if not isinstance(response, MockResponse): response = self._get_mock_response(response) @@ -228,5 +230,4 @@ def _get_mock_response(self, response): """ if "204" in str(response): return MockResponse(response, 204) - else: - return MockResponse(response, 200) + return MockResponse(response, 200) diff --git a/tests/test_acceleration_pool.py b/tests/test_acceleration_pool.py index dfd467a..195bfb9 100644 --- a/tests/test_acceleration_pool.py +++ b/tests/test_acceleration_pool.py @@ -15,6 +15,8 @@ """Module for testing accelaration pool client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions from PyPowerFlex.objects import acceleration_pool import tests @@ -60,7 +62,7 @@ def test_acceleration_pool_create(self): self.client.acceleration_pool.create( media_type=acceleration_pool.MediaType.ssd, protection_domain_id=self.fake_pd_id, - isRfcache=True) + is_rfcache=True) def test_acceleration_pool_create_bad_status(self): """ @@ -71,7 +73,7 @@ def test_acceleration_pool_create_bad_status(self): self.client.acceleration_pool.create, media_type=acceleration_pool.MediaType.ssd, protection_domain_id=self.fake_pd_id, - isRfcache=True) + is_rfcache=True) def test_acceleration_pool_create_no_id_in_response(self): """ @@ -82,7 +84,7 @@ def test_acceleration_pool_create_no_id_in_response(self): self.client.acceleration_pool.create, media_type=acceleration_pool.MediaType.ssd, protection_domain_id=self.fake_pd_id, - isRfcache=True) + is_rfcache=True) def test_acceleration_pool_delete(self): """ diff --git a/tests/test_deployment.py b/tests/test_deployment.py index fa42d99..57d26e6 100644 --- a/tests/test_deployment.py +++ b/tests/test_deployment.py @@ -15,6 +15,8 @@ """Module for testing deployment client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions import tests diff --git a/tests/test_device.py b/tests/test_device.py index cf3a7ff..9c604ac 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -15,6 +15,8 @@ """Module for testing device client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions from PyPowerFlex.objects.device import MediaType import tests diff --git a/tests/test_fault_set.py b/tests/test_fault_set.py index f9bac18..770f064 100644 --- a/tests/test_fault_set.py +++ b/tests/test_fault_set.py @@ -15,6 +15,8 @@ """Module for testing fault set client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions import tests diff --git a/tests/test_firmware_repository.py b/tests/test_firmware_repository.py index 43023e2..7ce7112 100644 --- a/tests/test_firmware_repository.py +++ b/tests/test_firmware_repository.py @@ -15,6 +15,8 @@ """Module for testing firmware repository client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions import tests diff --git a/tests/test_host.py b/tests/test_host.py index 1b33577..4012d2d 100644 --- a/tests/test_host.py +++ b/tests/test_host.py @@ -15,6 +15,8 @@ """Module for testing host client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions import tests diff --git a/tests/test_managed_device.py b/tests/test_managed_device.py index 38b24df..9e5039c 100644 --- a/tests/test_managed_device.py +++ b/tests/test_managed_device.py @@ -15,6 +15,8 @@ """Module for testing managed device client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions import tests diff --git a/tests/test_protection_domain.py b/tests/test_protection_domain.py index 45ec6e4..8d3146a 100644 --- a/tests/test_protection_domain.py +++ b/tests/test_protection_domain.py @@ -15,6 +15,8 @@ """Module for testing protection domain client.""" +# pylint: disable=invalid-name,too-many-public-methods,duplicate-code + from PyPowerFlex import exceptions from PyPowerFlex.objects import protection_domain import tests diff --git a/tests/test_replication_consistency_group.py b/tests/test_replication_consistency_group.py index e7bddaa..fb3befe 100644 --- a/tests/test_replication_consistency_group.py +++ b/tests/test_replication_consistency_group.py @@ -15,8 +15,9 @@ """Module for testing replication consistency group client.""" +# pylint: disable=invalid-name,too-many-public-methods + from PyPowerFlex import exceptions -from PyPowerFlex.objects import replication_consistency_group as rcg import tests diff --git a/tests/test_replication_pair.py b/tests/test_replication_pair.py index 534fd0d..d81a95e 100644 --- a/tests/test_replication_pair.py +++ b/tests/test_replication_pair.py @@ -15,8 +15,9 @@ """Module for testing replication pair client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions -from PyPowerFlex.objects import replication_pair import tests diff --git a/tests/test_sdc.py b/tests/test_sdc.py index 06c6906..39f1f08 100644 --- a/tests/test_sdc.py +++ b/tests/test_sdc.py @@ -15,6 +15,8 @@ """Module for testing SDC client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions import tests diff --git a/tests/test_sds.py b/tests/test_sds.py index eb59301..8b9ac4b 100644 --- a/tests/test_sds.py +++ b/tests/test_sds.py @@ -15,6 +15,8 @@ """Module for testing SDS client.""" +# pylint: disable=invalid-name,too-many-public-methods + from PyPowerFlex import exceptions from PyPowerFlex.objects import sds import tests diff --git a/tests/test_sdt.py b/tests/test_sdt.py index b001c19..927d007 100644 --- a/tests/test_sdt.py +++ b/tests/test_sdt.py @@ -15,6 +15,8 @@ """Module for testing SDT client.""" +# pylint: disable=invalid-name,too-many-public-methods + from PyPowerFlex import exceptions from PyPowerFlex.objects import sdt import tests diff --git a/tests/test_service_template.py b/tests/test_service_template.py index 9d9a49b..b0afa22 100644 --- a/tests/test_service_template.py +++ b/tests/test_service_template.py @@ -15,6 +15,8 @@ """Module for testing service template client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions import tests diff --git a/tests/test_snapshot_policy.py b/tests/test_snapshot_policy.py index 2779d5d..917650e 100644 --- a/tests/test_snapshot_policy.py +++ b/tests/test_snapshot_policy.py @@ -15,6 +15,8 @@ """Module for testing snapshot policy client.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions from PyPowerFlex.objects import snapshot_policy as sp import tests diff --git a/tests/test_storage_pool.py b/tests/test_storage_pool.py index 6c74dff..0b0ba2c 100644 --- a/tests/test_storage_pool.py +++ b/tests/test_storage_pool.py @@ -15,6 +15,8 @@ """Module for testing storage pool client.""" +# pylint: disable=invalid-name,too-many-public-methods + from PyPowerFlex import exceptions from PyPowerFlex.objects.storage_pool import CompressionMethod from PyPowerFlex.objects.storage_pool import ExternalAccelerationType diff --git a/tests/test_system.py b/tests/test_system.py index 15fb8fb..b5f6e92 100644 --- a/tests/test_system.py +++ b/tests/test_system.py @@ -15,6 +15,8 @@ """Module for testing system client.""" +# pylint: disable=invalid-name,too-many-public-methods,duplicate-code + from PyPowerFlex import exceptions from PyPowerFlex.objects import system import tests diff --git a/tests/test_utility.py b/tests/test_utility.py index 84457fd..a434a3f 100644 --- a/tests/test_utility.py +++ b/tests/test_utility.py @@ -15,8 +15,9 @@ """Module for testing PowerFlex utility.""" +# pylint: disable=invalid-name + from PyPowerFlex import exceptions -from PyPowerFlex.objects import utility import tests diff --git a/tests/test_volume.py b/tests/test_volume.py index 8750b36..0944a3d 100644 --- a/tests/test_volume.py +++ b/tests/test_volume.py @@ -15,6 +15,8 @@ """Module for testing volume client.""" +# pylint: disable=invalid-name,too-many-public-methods + from PyPowerFlex import exceptions from PyPowerFlex.objects import volume import tests