Skip to content

Commit 883074d

Browse files
committed
add hpecp/lock doc check
Signed-off-by: Chris Snow <[email protected]>
1 parent 2cdd145 commit 883074d

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
install:
3737
- pip3 install flake8 flake8-docstrings flake8-per-file-ignores
3838
script:
39-
- flake8 --exclude hpecp/gateway.py,hpecp/logger.py,hpecp/lock.py,hpecp/k8s_cluster.py,hpecp/license.py,hpecp/user.py,hpecp/tenant.py,hpecp/role.py --docstring-convention numpy bin/ hpecp/
39+
- flake8 --exclude hpecp/gateway.py,hpecp/logger.py,hpecp/k8s_cluster.py,hpecp/license.py,hpecp/user.py,hpecp/tenant.py,hpecp/role.py --docstring-convention numpy bin/ hpecp/
4040
- stage: coverage_library
4141
name: "Code coverage LIBRARY (./hpecp)"
4242
python: 3.8

hpecp/lock.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ def list(self):
4444
return self.get()
4545

4646
def create(self, reason=None):
47-
"""Create a new lock
47+
"""Create a new lock.
4848
49-
Arguments:
49+
Arguments
50+
---------
51+
reason: str
52+
Provide a reason for the lock.
5053
51-
reason: str
52-
Provide a reason for the lock
53-
54-
Raises:
55-
56-
APIException
54+
Raises
55+
------
56+
APIException
5757
"""
5858
data = {"reason": reason}
5959
return self.client._request(
@@ -64,17 +64,17 @@ def create(self, reason=None):
6464
)
6565

6666
def delete(self, lock_id):
67-
"""Delete a lock
68-
69-
Arguments:
67+
"""Delete a lock.
7068
71-
lock_id: str
72-
The lock id as retrieved with `get()` Format:
73-
'/api/v1/lock/[0-9]+'
69+
Parameters
70+
----------
71+
lock_id: str
72+
The lock id as retrieved with `get()` Format:
73+
'/api/v1/lock/[0-9]+'
7474
75-
Raises:
76-
77-
APIException
75+
Raises
76+
------
77+
APIException
7878
"""
7979

8080
assert isinstance(
@@ -89,17 +89,17 @@ def delete(self, lock_id):
8989
)
9090

9191
def delete_all(self, timeout_secs=300):
92-
"""Delete all locks
93-
94-
Arguments:
95-
96-
timeout_secs: int
97-
How long to wait for internal locks (note these need to be
98-
cleared before external locks can be deleted)
92+
"""Delete all locks.
9993
100-
Raises:
94+
Parameters
95+
----------
96+
timeout_secs: int
97+
How long to wait for internal locks (note these need to be
98+
cleared before external locks can be deleted)
10199
102-
APIException
100+
Raises
101+
------
102+
APIException
103103
"""
104104

105105
try:

0 commit comments

Comments
 (0)