Skip to content

Commit cf7c90c

Browse files
authored
[Documentation][zoau_version_checker] Standarize docstrings on module_utils/zoau_version_checker.py (#1338)
* Standarize docstrings on module_utils/zoau_version_checker.py * Create changelog fragment * Modify google style to numpy * Standarize numpy style
1 parent dd94cb2 commit cf7c90c

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
trivial:
2+
- zoau_version_checker - Updated docstrings to numpy style for visual aid to developers.
3+
(https://github.com/ansible-collections/ibm_zos_core/pull/1338).

plugins/module_utils/zoau_version_checker.py

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,16 @@
2525

2626
def is_zoau_version_higher_than(min_version_str):
2727
"""Reports back if ZOAU version is high enough.
28-
Arguments:
29-
min_version_str {str} -- The minimal desired ZOAU version '#.#.#'.
30-
Returns:
31-
bool -- Whether ZOAU version found was high enough.
28+
29+
Parameters
30+
----------
31+
min_version_str : str
32+
The minimal desired ZOAU version '#.#.#'.
33+
34+
Returns
35+
-------
36+
bool
37+
Whether ZOAU version found was high enough.
3238
"""
3339
if is_valid_version_string(min_version_str):
3440
# check zoau version on system (already a list)
@@ -78,10 +84,16 @@ def is_valid_version_string(version_str):
7884
series of numbers (minor) followed by another dot(.) followed by a
7985
series of numbers (patch) i.e. "#.#.#" where '#' can be any integer.
8086
There is a provision for a 4th level to this eg "v1.2.0.1".
81-
Arguments:
82-
min_version_str {str} -- String to be verified is in correct format.
83-
Returns:
84-
bool -- Whether provided str is in correct format.
87+
88+
Parameters
89+
----------
90+
min_version_str : str
91+
String to be verified is in correct format.
92+
93+
Returns
94+
-------
95+
bool
96+
Whether provided str is in correct format.
8597
"""
8698

8799
# split string into [major, minor, patch]
@@ -97,10 +109,12 @@ def is_valid_version_string(version_str):
97109

98110
def get_zoau_version_str():
99111
"""Attempts to call zoaversion on target and parses out version string.
100-
Returns:
101-
{ [int, int, int] } -- ZOAU version found in format [#,#,#]. There is a
102-
provision for a 4th level eg "v1.2.0.1".
103112
113+
Returns
114+
-------
115+
Union[int, int, int]
116+
ZOAU version found in format [#,#,#]. There is a
117+
provision for a 4th level eg "v1.2.0.1".
104118
"""
105119
version_list = (
106120
ZOAU_API_VERSION.split('.')

0 commit comments

Comments
 (0)