Skip to content

Commit 3bd6749

Browse files
authored
Merge pull request #400 from zowe/fix-lint
chore: fix pydoclint warnings 😋
2 parents 24102f6 + 6e57872 commit 3bd6749

9 files changed

Lines changed: 144 additions & 7 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ style = "numpy"
1313
check-arg-order = false
1414
require-return-section-when-returning-nothing = false
1515
quiet = true
16+
exclude = "build|response"

src/workflows/zowe/workflows_for_zowe_sdk/response/workflows.py

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
class CreateWorkflowResponse:
1919
"""
2020
Workflow definition, returned by z/OSMF on a "create workflow" request.
21+
2122
See more at: [Create a workflow: Response from a create workflow request](https://www.ibm.com/docs/en/zos/3.1.0?topic=services-create-workflow#POSTMethodCreateAWorkflow__CreateWorkflowResponse)
2223
2324
Parameters
@@ -45,15 +46,18 @@ def __init__(self, response: dict[str, Any]) -> None:
4546
super().__setattr__(key, value)
4647

4748
def __getitem__(self, key: str) -> Any:
49+
"""Get item by key."""
4850
return self.__dict__[key]
4951

5052
def __setitem__(self, key: str, value: Any) -> None:
53+
"""Set item by key."""
5154
self.__dict__[key] = value
5255

5356
@dataclass
5457
class GetWorkflowPropertiesResponse:
5558
"""
5659
Workflow definition, returned by z/OSMF on "get workflow properties" request.
60+
5761
See more at: [Get the properties of a workflow: JSON object that is returned to a get workflow properties request](https://www.ibm.com/docs/en/zos/3.1.0?topic=services-get-properties-workflow#GETMethodRetrieveInformationAboutWF__ResponseBodyGetProperties)
5862
5963
Parameters
@@ -187,15 +191,18 @@ def __init__(self, response: dict[str, Any]) -> None:
187191
super().__setattr__(key, value)
188192

189193
def __getitem__(self, key: str) -> Any:
194+
"""Get item by key."""
190195
return self.__dict__[key.replace("-", "_")]
191196

192197
def __setitem__(self, key: str, value: Any) -> None:
198+
"""Set item by key."""
193199
self.__dict__[key.replace("-", "_")] = value
194200

195201
@dataclass
196202
class WorkflowAutomationStatusResponse:
197203
"""
198204
An automation-info object that contains details about the most recent start automation request for the workflow.
205+
199206
The content of this property depends on the following factors:
200207
- If no automation was performed for the workflow, this property is null.
201208
- If automation processing is still in progress, this property indicates the step that is being processed.
@@ -244,9 +251,11 @@ def __init__(self, response: dict[str, Any]) -> None:
244251
super().__setattr__(key, value)
245252

246253
def __getitem__(self, key: str) -> Any:
254+
"""Get item by key."""
247255
return self.__dict__[key]
248256

249257
def __setitem__(self, key: str, value: Any) -> None:
258+
"""Set item by key."""
250259
self.__dict__[key] = value
251260

252261
@dataclass
@@ -466,9 +475,11 @@ def __init__(self, response: dict[str, Any]) -> None:
466475
super().__setattr__(key, value)
467476

468477
def __getitem__(self, key: str) -> Any:
478+
"""Get item by key."""
469479
return self.__dict__[key.replace("-", "_")]
470480

471481
def __setitem__(self, key: str, value: Any) -> None:
482+
"""Set item by key."""
472483
self.__dict__[key.replace("-", "_")] = value
473484

474485
@dataclass
@@ -499,15 +510,18 @@ def __init__(self, response: dict[str, Any]) -> None:
499510
super().__setattr__(key, value)
500511

501512
def __getitem__(self, key: str) -> Any:
513+
"""Get item by key."""
502514
return self.__dict__[key]
503515

504516
def __setitem__(self, key: str, value: Any) -> None:
517+
"""Set item by key."""
505518
self.__dict__[key] = value
506519

507520
@dataclass
508521
class WorkflowJobStatusResponse:
509522
"""
510523
TODO: this class is very similar to the JobResponse class from zos_jobs_for_zowe_sdk.
524+
511525
It is better to consider their merging.
512526
513527
Contains details about the job.
@@ -551,11 +565,13 @@ def __init__(self, response: dict[str, Any]) -> None:
551565
super().__setattr__(key, value)
552566

553567
def __getitem__(self, key: str) -> Any:
568+
"""Get item by key."""
554569
if key == "class":
555570
key = "job_class"
556571
return self.__dict__[key]
557572

558573
def __setitem__(self, key: str, value: Any) -> None:
574+
"""Set item by key."""
559575
if key == "class":
560576
key = "job_class"
561577
self.__dict__[key] = value
@@ -602,18 +618,22 @@ def __init__(self, response: dict[str, Any]) -> None:
602618
super().__setattr__(key, value)
603619

604620
def __getitem__(self, key: str) -> Any:
621+
"""Get item by key."""
605622
if key == "class":
606623
key = "job_class"
607624
return self.__dict__[key.replace("-", "_")]
608625

609626
def __setitem__(self, key: str, value: Any) -> None:
627+
"""Set item by key."""
610628
if key == "class":
611629
key = "job_class"
612630
self.__dict__[key.replace("-", "_")] = value
613631

614632
@dataclass
615633
class WorkflowVariableReferenceResponse:
616634
"""
635+
Variable-reference object returned by z/OSMF.
636+
617637
For more information:
618638
- [Get Workflow Properties request: Format of the variable-reference object](https://www.ibm.com/docs/en/zos/3.1.0?topic=services-get-properties-workflow#GETMethodRetrieveInformationAboutWF__ResponseBodyGetPropertiesVarRef)
619639
@@ -633,9 +653,11 @@ def __init__(self, response: dict[str, Any]) -> None:
633653
super().__setattr__(key, value)
634654

635655
def __getitem__(self, key: str) -> Any:
656+
"""Get item by key."""
636657
return self.__dict__[key]
637658

638659
def __setitem__(self, key: str, value: Any) -> None:
660+
"""Set item by key."""
639661
self.__dict__[key] = value
640662

641663
@dataclass
@@ -671,15 +693,18 @@ def __init__(self, response: dict[str, Any]) -> None:
671693
super().__setattr__(key, value)
672694

673695
def __getitem__(self, key: str) -> Any:
696+
"""Get item by key."""
674697
return self.__dict__[key]
675698

676699
def __setitem__(self, key: str, value: Any) -> None:
700+
"""Set item by key."""
677701
self.__dict__[key] = value
678702

679703
@dataclass
680704
class ListWorkflowsResponse:
681705
"""
682706
Workflow definition, returned by z/OSMF on "list workflows" request.
707+
683708
See more at: [List workflows request: Format of the workflow-info object](https://www.ibm.com/docs/en/zos/3.1.0?topic=services-list-workflows-system-sysplex#GETMethodListWorkflows__ResponseBodyListWorkflows)
684709
685710
Parameters
@@ -722,15 +747,18 @@ def __init__(self, response: dict[str, Any]) -> None:
722747
super().__setattr__(key, value)
723748

724749
def __getitem__(self, key: str) -> Any:
750+
"""Get item by key."""
725751
return self.__dict__[key]
726752

727753
def __setitem__(self, key: str, value: Any) -> None:
754+
"""Set item by key."""
728755
self.__dict__[key] = value
729756

730757
@dataclass
731758
class GetWorkflowDefinitionResponse:
732759
"""
733760
Workflow definition, returned by z/OSMF on "list workflows" request.
761+
734762
See more at: [Retrieve a workflow definition: JSON object that is returned to a retrieve a workflow definition request](https://www.ibm.com/docs/en/zos/3.1.0?topic=services-retrieve-workflow-definition#GETMethodRetrieveWorkflowDefinition__ResponseBodyGetTemplate)
735763
736764
Parameters
@@ -750,7 +778,7 @@ class GetWorkflowDefinitionResponse:
750778
isCallable: Optional[Literal["system", "sysplex"]]
751779
Indicates the callable scope for the workflow.
752780
containsParallelSteps: Optional[bool]
753-
For a workflow with automated steps, this property indicates whether the automated steps can be run in parallel (concurrently).
781+
For a workflow with automated steps, this property indicates whether the automated steps can be run in parallel (concurrently).
754782
scope: Optional[Literal["system", "sysplex", "none"]]
755783
Indicates the singleton scope for the workflow.
756784
jobsOutputDirectory: Optional[str]
@@ -764,7 +792,7 @@ class GetWorkflowDefinitionResponse:
764792
productVersion: Optional[str]
765793
Version and release of the product or component that is configured through the workflow.
766794
globalVariableGroup: Optional[str]
767-
Global variable group for the workflow.
795+
Global variable group for the workflow.
768796
isInstanceVariableWithoutPrefix: Optional[bool]
769797
Indicates whether the simplified format is used for references to instance variables.
770798
steps: Optional[list['WorkflowDefinitionStepResponse']]
@@ -801,9 +829,11 @@ def __init__(self, response: dict[str, Any]) -> None:
801829
super().__setattr__(key, value)
802830

803831
def __getitem__(self, key: str) -> Any:
832+
"""Get item by key."""
804833
return self.__dict__[key]
805834

806835
def __setitem__(self, key: str, value: Any) -> None:
836+
"""Set item by key."""
807837
self.__dict__[key] = value
808838

809839
@dataclass
@@ -966,9 +996,11 @@ def __init__(self, response: dict[str, Any]) -> None:
966996
super().__setattr__(key, value)
967997

968998
def __getitem__(self, key: str) -> Any:
999+
"""Get item by key."""
9691000
return self.__dict__[key.replace("-", "_")]
9701001

9711002
def __setitem__(self, key: str, value: Any) -> None:
1003+
"""Set item by key."""
9721004
self.__dict__[key.replace("-", "_")] = value
9731005

9741006
@dataclass
@@ -994,9 +1026,11 @@ def __init__(self, response: dict[str, Any]) -> None:
9941026
super().__setattr__(key, value)
9951027

9961028
def __getitem__(self, key: str) -> Any:
1029+
"""Get item by key."""
9971030
return self.__dict__[key]
9981031

9991032
def __setitem__(self, key: str, value: Any) -> None:
1033+
"""Set item by key."""
10001034
self.__dict__[key] = value
10011035

10021036
@dataclass
@@ -1020,9 +1054,11 @@ def __init__(self, response: dict[str, Any]) -> None:
10201054
super().__setattr__(key, value)
10211055

10221056
def __getitem__(self, key: str) -> Any:
1057+
"""Get item by key."""
10231058
return self.__dict__[key]
10241059

10251060
def __setitem__(self, key: str, value: Any) -> None:
1061+
"""Set item by key."""
10261062
self.__dict__[key] = value
10271063

10281064
@dataclass
@@ -1052,9 +1088,11 @@ def __init__(self, response: dict[str, Any]) -> None:
10521088
super().__setattr__(key, value)
10531089

10541090
def __getitem__(self, key: str) -> Any:
1091+
"""Get item by key."""
10551092
return self.__dict__[key]
10561093

10571094
def __setitem__(self, key: str, value: Any) -> None:
1095+
"""Set item by key."""
10581096
self.__dict__[key] = value
10591097

10601098
@dataclass
@@ -1088,13 +1126,13 @@ class WorkflowDefinitionVariableResponse:
10881126
maxLength: Optional[int]
10891127
Maximum length of the variable value.
10901128
maxValue: Optional[str]
1091-
Maximum value of the variable.
1129+
Maximum value of the variable.
10921130
minLength: Optional[int]
10931131
Minimum length of the variable value.
10941132
minValue: Optional[str]
1095-
Minimum value of the variable.
1133+
Minimum value of the variable.
10961134
promptAtCreate: Optional[bool]
1097-
Indicates whether the user is prompted to specify a value for the variable during the create workflow process.
1135+
Indicates whether the user is prompted to specify a value for the variable during the create workflow process.
10981136
regularExpression: Optional[str]
10991137
Provides a standard regular expression that constrains the variable value, as an alternative to the available validation types.
11001138
requiredAtCreate: Optional[bool]
@@ -1135,15 +1173,18 @@ def __init__(self, response: dict[str, Any]) -> None:
11351173
super().__setattr__(key, value)
11361174

11371175
def __getitem__(self, key: str) -> Any:
1176+
"""Get item by key."""
11381177
return self.__dict__[key]
11391178

11401179
def __setitem__(self, key: str, value: Any) -> None:
1180+
"""Set item by key."""
11411181
self.__dict__[key] = value
11421182

11431183
@dataclass
11441184
class ListArchivedWorkflowsResponse:
11451185
"""
11461186
Workflow definition, returned by z/OSMF on "list archived workflows" request.
1187+
11471188
See more at: [List archived workflows request: Format of the workflow-info object](https://www.ibm.com/docs/en/zos/3.1.0?topic=services-list-archived-workflows-system#GETMethodListArchivedWorkflows__ResponseBodyListWorkflows)
11481189
11491190
Parameters
@@ -1165,15 +1206,18 @@ def __init__(self, response: dict[str, Any]) -> None:
11651206
super().__setattr__(key, value)
11661207

11671208
def __getitem__(self, key: str) -> Any:
1209+
"""Get item by key."""
11681210
return self.__dict__[key]
11691211

11701212
def __setitem__(self, key: str, value: Any) -> None:
1213+
"""Set item by key."""
11711214
self.__dict__[key] = value
11721215

11731216
@dataclass
11741217
class GetArchivedWorkflowPropertiesResponse:
11751218
"""
11761219
Workflow definition, returned by z/OSMF on "get archived workflow properties" request.
1220+
11771221
See more at: [Get the properties of an archived workflow: JSON object that is returned to a get archived workflow properties request](https://www.ibm.com/docs/en/zos/3.1.0?topic=services-get-properties-archived-workflow#GETMethodRetrieveInformationArchived__ResponseBodyGetArchivedProperties)
11781222
11791223
Parameters
@@ -1209,7 +1253,7 @@ class GetArchivedWorkflowPropertiesResponse:
12091253
isCallable: Optional[bool]
12101254
Indicates whether a workflow is eligible to be called by another workflow.
12111255
containsParallelSteps: Optional[bool]
1212-
For a workflow with automated steps, this property indicates whether the automated steps can be run in parallel (concurrently).
1256+
For a workflow with automated steps, this property indicates whether the automated steps can be run in parallel (concurrently).
12131257
scope: Optional[Literal["system", "sysplex", "none"]]
12141258
Indicates the singleton scope for the workflow.
12151259
statusName: Optional[Literal["in-progress", "complete", "automation-in-progress", "cancelled"]]
@@ -1276,9 +1320,11 @@ def __init__(self, response: dict[str, Any]) -> None:
12761320
super().__setattr__(key, value)
12771321

12781322
def __getitem__(self, key: str) -> Any:
1323+
"""Get item by key."""
12791324
return self.__dict__[key]
12801325

12811326
def __setitem__(self, key: str, value: Any) -> None:
1327+
"""Set item by key."""
12821328
self.__dict__[key] = value
12831329

12841330
@dataclass
@@ -1480,7 +1526,9 @@ def __init__(self, response: dict[str, Any]) -> None:
14801526
super().__setattr__(key, value)
14811527

14821528
def __getitem__(self, key: str) -> Any:
1529+
"""Get item by key."""
14831530
return self.__dict__[key.replace("-", "_")]
14841531

14851532
def __setitem__(self, key: str, value: Any) -> None:
1533+
"""Set item by key."""
14861534
self.__dict__[key.replace("-", "_")] = value

src/zos_console/zowe/zos_console_for_zowe_sdk/response/console.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
@dataclass
1818
class IssueCommandResponse:
19+
"""Issue command response dataclass."""
20+
1921
cmd_response_key: Optional[str] = None
2022
cmd_response_url: Optional[str] = None
2123
cmd_response_uri: Optional[str] = None
@@ -27,14 +29,18 @@ def __init__(self, response: dict[str, Any]) -> None:
2729
super().__setattr__(key, value)
2830

2931
def __getitem__(self, key: str) -> str:
32+
"""Get item by key."""
3033
return str(self.__dict__[key.replace("-", "_")])
3134

3235
def __setitem__(self, key: str, value: str) -> None:
36+
"""Set item by key."""
3337
self.__dict__[key.replace("-", "_")] = value
3438

3539

3640
@dataclass
3741
class ConsoleResponse:
42+
"""Console response dataclass."""
43+
3844
cmd_response: Optional[str] = None
3945
sol_key_detected: Optional[bool] = None
4046

@@ -44,7 +50,9 @@ def __init__(self, response: dict[str, Any]) -> None:
4450
super().__setattr__(key, value)
4551

4652
def __getitem__(self, key: str) -> Any:
53+
"""Get item by key."""
4754
return self.__dict__[key.replace("-", "_")]
4855

4956
def __setitem__(self, key: str, value: Any) -> None:
57+
"""Set item by key."""
5058
self.__dict__[key.replace("-", "_")] = value

0 commit comments

Comments
 (0)