Skip to content

Commit 2b807ac

Browse files
committed
Cleanup and fix
1 parent 6a15981 commit 2b807ac

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

linode_api4/groups/lock.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from typing import Union
2-
31
from linode_api4.errors import UnexpectedResponseError
42
from linode_api4.groups import Group
53
from linode_api4.objects import Lock, LockType
@@ -24,7 +22,7 @@ def __call__(self, *filters):
2422
2523
locks = client.locks()
2624
27-
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-locks
25+
API Documentation: TBD
2826
2927
:param filters: Any number of filters to apply to this query.
3028
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
@@ -38,20 +36,20 @@ def __call__(self, *filters):
3836
def create(
3937
self,
4038
entity_type: str,
41-
entity_id: Union[int, str],
42-
lock_type: Union[LockType, str] = LockType.cannot_delete,
39+
entity_id: int | str,
40+
lock_type: LockType | str = LockType.cannot_delete,
4341
) -> Lock:
4442
"""
4543
Creates a new Resource Lock for the specified entity.
4644
47-
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-lock
45+
API Documentation: TBD
4846
4947
:param entity_type: The type of entity to lock (e.g., "linode").
5048
:type entity_type: str
5149
:param entity_id: The ID of the entity to lock.
52-
:type entity_id: int or str
50+
:type entity_id: int | str
5351
:param lock_type: The type of lock to create. Defaults to "cannot_delete".
54-
:type lock_type: LockType or str
52+
:type lock_type: LockType | str
5553
5654
:returns: The newly created Resource Lock.
5755
:rtype: Lock

0 commit comments

Comments
 (0)