Skip to content

Commit bcae705

Browse files
committed
Fix Linting Issues
1 parent d590af9 commit bcae705

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2595
-605
lines changed

.github/workflows/pylint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Run Lint Check via Pylint
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
name: lint
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: ['3.9', '3.10', '3.11', '3.12']
13+
14+
steps:
15+
- name: Checkout the source code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: python -m pip install --upgrade pip && pip install pylint
25+
26+
- name: Analyzing the code with pylint
27+
run: pylint $(git ls-files '*.py')

PyPowerFlex/__init__.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# License for the specific language governing permissions and limitations
1414
# under the License.
1515

16+
"""This module is used for the initialization of PowerFlex Client."""
17+
1618
from packaging import version
1719

1820
from PyPowerFlex import configuration
@@ -28,6 +30,12 @@
2830

2931

3032
class PowerFlexClient:
33+
"""
34+
Client class for interacting with PowerFlex API.
35+
36+
This class initializes the client with the provided configuration and provides
37+
access to the various storage entities available in the PowerFlex system.
38+
"""
3139
__slots__ = (
3240
'__is_initialized',
3341
'configuration',
@@ -82,6 +90,12 @@ def __add_storage_entity(self, attr_name, entity_class):
8290
setattr(self, attr_name, entity_class(self.token, self.configuration))
8391

8492
def initialize(self):
93+
"""
94+
Initializes the client.
95+
96+
Raises:
97+
PowerFlexClientException: If the PowerFlex API version is lower than 3.0.
98+
"""
8599
self.configuration.validate()
86100
self.__add_storage_entity('device', objects.Device)
87101
self.__add_storage_entity('fault_set', objects.FaultSet)
@@ -97,12 +111,16 @@ def initialize(self):
97111
self.__add_storage_entity('system', objects.System)
98112
self.__add_storage_entity('volume', objects.Volume)
99113
self.__add_storage_entity('utility', objects.PowerFlexUtility)
100-
self.__add_storage_entity('replication_consistency_group', objects.ReplicationConsistencyGroup)
114+
self.__add_storage_entity(
115+
'replication_consistency_group',
116+
objects.ReplicationConsistencyGroup)
101117
self.__add_storage_entity('replication_pair', objects.ReplicationPair)
102118
self.__add_storage_entity('service_template', objects.ServiceTemplate)
103119
self.__add_storage_entity('managed_device', objects.ManagedDevice)
104120
self.__add_storage_entity('deployment', objects.Deployment)
105-
self.__add_storage_entity('firmware_repository', objects.FirmwareRepository)
121+
self.__add_storage_entity(
122+
'firmware_repository',
123+
objects.FirmwareRepository)
106124
self.__add_storage_entity('host', objects.Host)
107125
utils.init_logger(self.configuration.log_level)
108126
if version.parse(self.system.api_version()) < version.Version('3.0'):

0 commit comments

Comments
 (0)